Skip to content

Commit e8e47f4

Browse files
committed
Update contributors.md
1 parent 942699d commit e8e47f4

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

docs/contributors.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@
33
### Checkin
44

55
- Do checkin source (src)
6-
- Do checkin build output (lib)
7-
- Do checkin runtime node_modules
8-
- Do not checkin devDependency node_modules (husky can help see below)
6+
- Do checkin a single index.js file after running `ncc`
7+
- Do not checking node_modules
98

10-
### devDependencies
9+
### NCC
1110

12-
In order to handle correctly checking in node_modules without devDependencies, we run [Husky](https://github.com/typicode/husky) before each commit.
13-
This step ensures that formatting and checkin rules are followed and that devDependencies are excluded. To make sure Husky runs correctly, please use the following workflow:
11+
In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`.
1412

13+
If you're developing locally you can run
1514
```
16-
npm install # installs all devDependencies including Husky
17-
git add abc.ext # Add the files you've changed. This should include files in src, lib, and node_modules (see above)
18-
git commit -m "Informative commit message" # Commit. This will run Husky
15+
npm install
16+
tsc
17+
ncc build
1918
```
19+
You can also do
20+
```
21+
npm run-script build # runs tsc
22+
npm run-script format # runs prettier --write
23+
npm run-script format-check # runs prettier --check
24+
npm run-script test # runs jest
25+
npm run-script release # runs ncc build
26+
```
27+
28+
Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are excluded using `.gitignore`.
29+
30+
### Testing
31+
32+
Tests are included under `_tests_/*` and can be run using `npm run-script test`.
2033

21-
During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) as well as pruning out devDependencies using `npm prune --production`.
22-
It will also make sure these changes are appropriately included in your commit (no further work is needed)
34+
We ask that you include a link to a successful run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs.

0 commit comments

Comments
 (0)