Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
# runtime dependencies are checked in
# dev dependencies are *not* checked in
node_modules/.bin
node_modules/typescript
node_modules/@types
node_modules/prettier
__tests__/runner/*
!node_modules/
__tests__/runner/*
19 changes: 12 additions & 7 deletions docs/contributors.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# Contributors


# Checkin
### Checkin

- Do checkin source (src)
- Do checkin build output (lib)
- Do checkin runtime node_modules
- Do not checkin
- Do not checkin devDependency node_modules (husky can help see below)

# Adding a dev dependency
### devDependencies

Remember to update .gitignore.
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:

# Updating toolkit dependency
```
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
```

Until released publically, update tgz packages in toolkit
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)
202 changes: 202 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
"@types/jest": "^24.0.13",
"@types/node": "^12.0.4",
"@types/semver": "^6.0.0",
"husky": "^2.3.0",
"jest": "^24.8.0",
"jest-circus": "^24.7.1",
"prettier": "^1.17.1",
"ts-jest": "^24.0.2",
"typescript": "^3.5.1"
},
"husky": {
"hooks": {
"pre-commit": "npm run build && npm run format && npm prune --production && git add node_modules/*"
}
}
}