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
{{ message }}
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
* fix/npm-workspaces
- Remove description of how to use lerna from contribute.md
- Change tsconfig in create_sample.md
- Update create_service.md
Signed-off-by: Tim_Tech_Dev <[email protected]>
* Update create_service.md
- Fix path in tsconfig.json
- Reccomend using the create-service.py script
Signed-off-by: Tim_Tech_Dev <[email protected]>
* Apply suggestions from code review
Co-authored-by: Daniel Huber <[email protected]>
Co-authored-by: Daniel Huber <[email protected]>
Copy file name to clipboardExpand all lines: docs/contribute/contribute.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,19 +48,15 @@ cd path/to/nodecg-io
48
48
npm run watch
49
49
```
50
50
51
-
_Note:_ Watching all packages requires a lot of RAM.
52
-
Instead, you can watch just the packages you are actively working on e.g., `npm run watch -- --scope nodecg-io-twitch-chat --scope twitch-chat`.
53
-
This will just spawn a watch process for the twitch-chat sample and service and require way less memory.
54
-
55
51
## Run
56
52
57
-
To test the changes you simply need to start/restart nodecg.
53
+
To test the changes you simply need to start/restart NodeCG.
58
54
59
55
## Adding dependencies to packages
60
56
61
-
This project uses [lerna](https://lerna.js.org) to manage our monorepo, and most importantly link all our packages together.
57
+
This project uses [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/) to manage our monorepo, and most importantly link all our packages together.
62
58
Because of linking you should not use `npm install xyz --save` to add dependencies because npm can't get the development version of internal packages like `nodecg-io-core`. Doing so will result in an error and break the link.
63
-
Instead, you should edit the `package.json` directly using a text editor and the run `npm run bootstrap` in the repository root.
59
+
Instead, you should edit the `package.json` directly using a text editor and the run `npm install` in the repository root.
Copy file name to clipboardExpand all lines: docs/contribute/create_service.md
+41-10Lines changed: 41 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,37 @@ This guide helps you to create a service integration such as _twitch-chat_ or _d
7
7
Go to [npmjs.com](https://www.npmjs.com/) and look whether there's already a package that wraps around the API of your service. If there's no such package, you need to create one yourself. This process is not described here. You may read the
8
8
[“Contributing packages to the registry” from the npm Docs](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
9
9
10
-
## Create a package
10
+
## Create a service
11
+
12
+
To create the service you can either use a premade Python 3 script in `.scripts/create-service.py`, or create the files manually.
13
+
14
+
## Using the script (recommended)
15
+
16
+
What this script does:
17
+
18
+
- It creates all required files for a new nodecg-io service
19
+
- It copies version and dependency information (e.g., for typescript) from `noodecg-io-template`
20
+
21
+
It'll also create a sample and the files for the docs
22
+
Requirements:
23
+
24
+
- python3 in your PATH
25
+
- executed from root of nodecg-io repo
26
+
27
+
The script waits for your input for each of those fields:
28
+
29
+
```shell
30
+
$ python3 .scripts/create-service.py
31
+
Service name: <name here>
32
+
Short description: <description here>
33
+
Author name: <author here>
34
+
Author url: <url here>
35
+
Sample name: <name here>
36
+
```
37
+
38
+
Now the script will rebuild your environment.
39
+
40
+
## Create the files manually
11
41
12
42
From here you will have to replace:
13
43
@@ -17,7 +47,7 @@ From here you will have to replace:
17
47
18
48
Now you need to create a package. You should call it `nodecg-io-your-service-name`.
19
49
20
-
First create a directory with that name put file called `package.json` into it.
50
+
First create a directory with that name in `/services/` and put file called `package.json` into it.
0 commit comments