Skip to content

Commit 9c52ac0

Browse files
author
Michael Cohen
committed
Fix imports, back to npm, contributing.md
1 parent f28b08e commit 9c52ac0

File tree

10 files changed

+21338
-6818
lines changed

10 files changed

+21338
-6818
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ProjectOpenSea/developer-experience

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
npx lint-staged

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn check-types
4+
npm run check-types

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ This is a best effort delivery messaging system. Messages that are not received
1919

2020
We recommend switching to Node.js version 16 to make sure common crypto dependencies work. Our minimum supported version is 16.11.0.
2121

22-
- If you have Node Version Manager, run `nvm use` to ensure a compatible version is being used.
23-
- Install this package with `yarn add --dev @opensea/stream-api`
22+
- Install this package with `npm install @opensea/stream-js`
2423

2524
# Getting Started
2625

contributing.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Contributing to OpenSea Stream API JS SDK
2+
3+
## Developing
4+
5+
We PR off of feature branches that get submitted to `main`. This is the branch that all pull
6+
requests should be made against. Version releases are bumped using `npm version patch`. Make sure to include the `Developer-Experience` team on any PR you submit.
7+
8+
To develop locally:
9+
10+
1. [clone](https://help.github.com/articles/cloning-a-repository/) this repo to your local device.
11+
12+
```sh
13+
git clone https://github.com/ProjectOpenSea/stream-js
14+
```
15+
16+
2. Create a new branch:
17+
```
18+
git checkout -b MY_BRANCH_NAME
19+
```
20+
3. If you have Node Version Manager, run `nvm use` to ensure a compatible version is being used.
21+
22+
4. Install the dependencies with:
23+
```
24+
npm install
25+
```
26+
5. Start developing and watch for code changes:
27+
```
28+
npm run dev
29+
```
30+
6. Look into `package.json` to see what other run configurations (such as `test`, `check-types`, and `lint:check`) you can use.
31+
32+
## Building
33+
34+
You can build the project, including all type definitions, with:
35+
36+
```bash
37+
npm run build
38+
```
39+
40+
### Running tests
41+
42+
```sh
43+
yarn test
44+
```
45+
46+
### Linting
47+
48+
To check the formatting of your code:
49+
50+
```sh
51+
npm run prettier
52+
```
53+
54+
If you get errors, you can fix them with:
55+
56+
```sh
57+
npm run prettier:fix
58+
```
59+
60+
### Set as a local dependency in package.json
61+
62+
While developing and debugging changes to this SDK, you can 'test-run' them locally inside another package using `npm link`.
63+
64+
1. Inside this repo, run
65+
66+
```sh
67+
npm link
68+
```
69+
70+
2. In your other package's root directory, make sure to remove `next` from `node_modules` with:
71+
72+
```sh
73+
rm -rf ./node_modules/next
74+
```
75+
76+
3. In your other package's root directory, run:
77+
78+
```sh
79+
npm link @opensea/stream-js
80+
```
81+
82+
to re-install all of the dependencies.
83+
84+
Note that this SDK will be copied from the locally compiled version as opposed to from being downloaded from the NPM registry.
85+
86+
4. Run your application as you normally would.
87+
88+
## Publishing
89+
90+
Repository admins can use `npm version patch` to create a new patch version.
91+
92+
- For minor version updates, use `npm version minor`.
93+
- For major version updates, use `npm version major`.
94+
95+
When creating a new version, submit a PR listing all the chanages that you'd like to roll out with this change (since the last major version).

docs/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ This is a best effort delivery messaging system. Messages that are not received
1919

2020
We recommend switching to Node.js version 16 to make sure common crypto dependencies work. Our minimum supported version is 16.11.0.
2121

22-
- If you have Node Version Manager, run `nvm use` to ensure a compatible version is being used.
23-
- Install this package with `yarn add --dev @opensea/stream-api`
22+
- Install this package with `npm install @opensea/stream-js`
2423

2524
# Getting Started
2625

0 commit comments

Comments
 (0)