From e8e47f49d098526442e205984b8b47cfcd43d46e Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Mon, 25 Nov 2019 11:36:48 -0500 Subject: [PATCH] Update contributors.md --- docs/contributors.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/docs/contributors.md b/docs/contributors.md index fece2ea..fbf0c1e 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -3,20 +3,32 @@ ### Checkin - Do checkin source (src) -- Do checkin build output (lib) -- Do checkin runtime node_modules -- Do not checkin devDependency node_modules (husky can help see below) +- Do checkin a single index.js file after running `ncc` +- Do not checking node_modules -### devDependencies +### NCC -In order to handle correctly checking in node_modules without devDependencies, we run [Husky](https://github.com/typicode/husky) before each commit. -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: +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/`. +If you're developing locally you can run ``` -npm install # installs all devDependencies including Husky -git add abc.ext # Add the files you've changed. This should include files in src, lib, and node_modules (see above) -git commit -m "Informative commit message" # Commit. This will run Husky +npm install +tsc +ncc build +``` +You can also do +``` +npm run-script build # runs tsc +npm run-script format # runs prettier --write +npm run-script format-check # runs prettier --check +npm run-script test # runs jest +npm run-script release # runs ncc build ``` -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`. -It will also make sure these changes are appropriately included in your commit (no further work is needed) \ No newline at end of file +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`. + +### Testing + +Tests are included under `_tests_/*` and can be run using `npm run-script test`. + +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. \ No newline at end of file