Skip to content

Commit

Permalink
Merge pull request scratchfoundation#27 from rschamp/hooks
Browse files Browse the repository at this point in the history
Make git hooks a bit less cumbersome
  • Loading branch information
rschamp authored Dec 15, 2016
2 parents 71a8a30 + 560849a commit d1cf0a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,15 @@ to the git hooks for the project. Create a file called `.opt-in` in the root of
the project with the contents:

```
precommit
prepush
postmerge
postrewrite
```

Or you can include only the hooks you would like to use.

### precommit
Run lint before committing

### prepush
Run tests before pushing
Run lint before pushing

### postmerge
`npm install` after merging
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"lint": "eslint . --ext .js,.jsx",
"postmerge": "opt --in postmerge --exec 'npm install'",
"postrewrite": "opt --in postrewrite --exec 'npm install'",
"precommit": "opt --in precommit --exec 'npm run lint'",
"prepush": "opt --in prepush --exec 'npm run test'",
"prepush": "opt --in prepush --exec 'npm run lint'",
"start": "webpack-dev-server --port $npm_package_config_port --content-base=./build",
"test": "npm run lint && npm run build"
},
Expand Down

0 comments on commit d1cf0a4

Please sign in to comment.