Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit bce0e66

Browse files
committed
Improve contribute guide
1 parent 5070fd3 commit bce0e66

File tree

2 files changed

+23
-34
lines changed

2 files changed

+23
-34
lines changed

docs/contribute/contribute.md

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ There are many ways to contribute to nodecg-io: logging bugs, submitting pull re
55
First you'll need a installation of nodecg-io. Please refer to the [installation guide](../getting_started/install.md) but
66
instead of using our repository you might want to fork the nodecg-io repository to your GitHub account and clone your fork.
77

8+
To make changes to the documentation you also need to clone the docs repo:
9+
```shell
10+
git clone https://github.com/codeoverflow-org/nodecg-io-docs.git
11+
```
12+
813
## Build
914

10-
### VsCode
15+
### VS Code
1116

12-
In `Vscode` you can start the build task with
17+
In Visual Studio Code you can start the build task with
1318
<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> (<kbd>CMD</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> on macOS).
1419
The incremental builder will do an initial full build.
1520
The watch builder will watch for file changes and compile those changes incrementally, giving you a fast, iterative coding experience.
@@ -28,48 +33,34 @@ cd path/to/nodecg-io
2833
npm run build
2934
```
3035

36+
To do a full rebuild instead of just a incremental build you can use `npm run rebuild`.
37+
3138
The watch builder can be activated here too:
3239

3340
```
3441
cd path/to/nodecg-io
3542
npm run watch
3643
```
3744

38-
## Add nodecg-io directory to the nodecg config:
39-
40-
Modify the nodecg configuration in `path/to/nodecg/cfg/nodecg.json`, here is an example config:
41-
42-
```json
43-
{
44-
"bundles": {
45-
"paths": ["path/to/nodecg-io", "path/to/nodecg-io/samples"]
46-
}
47-
}
48-
```
49-
50-
_Note 1:_ This path should point to the root of this repository, not to a bundle inside this repo.
51-
52-
_Note 2:_ The second path to the samples is only required if you want to use a sample plugin.
53-
54-
_Note 3:_ If nodecg doesn't load nodecg-io for some reason you might want to use an absolute path here.
45+
_Note:_ Watching all packages requires a lot of RAM.
46+
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`.
47+
This will just spawn a watch process for the twitch-chat sample and service and require way less memory.
5548

5649
## Run
5750

5851
To test the changes you simply need to start/restart nodecg.
5952

60-
### Automated Testing
61-
62-
> Nothing yet
63-
64-
### Unit Testing
53+
## Adding dependencies to packages
6554

66-
> Nothing yet
55+
This project uses [lerna](https://lerna.js.org) to manage our monorepo and most importantly link all our packages together.
56+
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.
57+
Instead you should edit the `package.json` directly using a text editor and the run `npm run bootstrap` in the repository root.
6758

68-
## Work Branches
59+
## Open a Pull Request
6960

70-
Even if you have push rights on the codeoverflow-org/nodecg-io repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your personal workflow cruft out of sight.
61+
Once you have implemented your feature or fixed a bug push it to your fork and start a Pull Request.
7162

72-
## Pull Requests
63+
## Merge Upstream Changes
7364

7465
Occasionally you will want to merge changes in the upstream repository (the official code repo) with your fork.
7566

@@ -79,16 +70,14 @@ git checkout master
7970
git pull https://github.com/codeoverflow-org/nodecg-io master
8071
```
8172

82-
Manage any merge conflicts, commit them, and then push them to your fork. Now you can make a pull request from your folk.
73+
Manage any merge conflicts, commit them, and then push them to your fork.
74+
75+
You may also occasionally need to merge upstream master in a pull request. To do that make the above to update your local master and the merge your local master into your PR branch.
8376

8477
### Where to Contribute
8578

8679
After cloning and building the repo, check out the [issues list](https://github.com/codeoverflow-org/nodecg-io/issues). Issues labeled [`help wanted`](https://github.com/codeoverflow-org/nodecg-io/labels/help%20wanted) are good issues to submit a PR for. Issues labeled [`good first issue`](https://github.com/codeoverflow-org/nodecg-io/labels/good%20first%20issue) are great candidates to pick up if you are in the code for the first time. If you are contributing significant changes, please discuss with the assignee of the issue first before starting to work on the issue.
8780

88-
## Packaging
89-
90-
> Maybe in the future
91-
9281
## Suggestions
9382

9483
We're also interested in your feedback. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.

docs/contribute/sample_documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ To document a sample bundle take a look at the name of the service the sample bu
44

55
Don't forget to add the newly created MarkDown file to `mkdocs.yml`. When you create your documentation pull request, please include the id of your PR in the main repository in the description so the documentation is not merged before the actual code.
66

7-
You should make this very detailed so everyone gets it to work because a super-good implementation is worth nothing if there's nobody who can use it. Take a look at the [twitch sample bundle](../samples/twitch.md).
7+
You should make this very detailed so everyone gets it to work because a super-good implementation is worth nothing if there's nobody who can use it. Take a look at the [twitch sample bundle](../samples/twitch-chat.md).

0 commit comments

Comments
 (0)