You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,17 +36,21 @@ Thanks for contributing!
36
36
37
37
### Building yorkie-js-sdk
38
38
39
-
For building yorkie-js-sdk, You'll first need Node.js installed(Node.js version 18+ and npm version 7.10+ are required).
39
+
For building yorkie-js-sdk, You'll first need Node.js installed(Node.js version 18+ and pnpm version 9.6+ are required).
40
40
41
41
-[Node.js](https://nodejs.org/en) (version 18+)
42
-
-[npm](https://www.npmjs.com/) (version 7.10+)
42
+
-[pnpm](https://pnpm.io/) (version 9.6+)
43
43
44
44
```bash
45
45
# install packages
46
-
$ npm install
46
+
47
+
# In the root directory of the repository.
48
+
$ pnpm sdk install
47
49
48
50
# build
49
-
$ npm run build
51
+
52
+
# In the root directory of the repository.
53
+
$ pnpm sdk build
50
54
```
51
55
52
56
To generate proto messages, we use protoc-gen-connect-es, which is a code generator plugin for Protocol Buffer compilers, like buf and protoc. It generates both clients and server definitions from Protocol Buffer schema.
@@ -55,7 +59,9 @@ For more details, see [@connectrpc/protoc-gen-connect-es](https://github.com/con
55
59
56
60
```bash
57
61
# generate proto messages and the service client stub classes
58
-
$ npm run build:proto
62
+
63
+
# In the root directory of the repository.
64
+
$ pnpm sdk build:proto
59
65
```
60
66
61
67
> Primary "source of truth" location of protobuf message is
The examples have own local dependencies. So you should install dependencies before running examples.
15
15
16
16
```bash
17
-
# In the directory of the example.
18
-
$ npm install
17
+
# In the root directory of the repository.
18
+
$ pnpm install
19
19
```
20
20
21
21
Then you can run the examples.
22
22
23
23
```bash
24
-
# In the directory of the example.
25
-
$ npm run dev
24
+
# In the root directory of the repository.
25
+
$ pnpm <EXAMPLE-NAME> dev
26
+
27
+
# Or in the directory of the example.
28
+
$ pnpm dev
26
29
```
27
30
28
31
Open the browser and go to the URL that is printed in the terminal.
29
32
30
33
## Releasing an example to https://yorkie.dev
31
34
32
-
To release an example, the example should export static files to `./dist` directory when running `npm run build`.
35
+
To release an example, the example should export static files to `./dist` directory when running `pnpm <EXAMPLE-NAME> build` in the root directory of the repository or `pnpm build` in the directory of the example.
36
+
33
37
After the example is merged to the `main` branch, it is automatically deployed to https://yorkie.dev/yorkie-js-sdk/examples/{EXAMPLE-NAME}.
0 commit comments