Add precommit hook with husky
This commit is contained in:
parent
1e57ee158d
commit
00a2819b79
4 changed files with 38 additions and 4 deletions
|
@ -14,13 +14,13 @@ Install dependencies
|
|||
npm i
|
||||
```
|
||||
|
||||
Run the watcher to browserify JS as you code
|
||||
Run the watcher to browserify JS while you code
|
||||
|
||||
```sh
|
||||
npm run-script watch
|
||||
```
|
||||
|
||||
Browserify / babelify /uglify before pushing to production
|
||||
Build before pushing to production
|
||||
|
||||
```sh
|
||||
npm run-script build
|
||||
|
|
File diff suppressed because one or more lines are too long
30
package-lock.json
generated
30
package-lock.json
generated
|
@ -571,6 +571,12 @@
|
|||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg="
|
||||
},
|
||||
"ci-info": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz",
|
||||
"integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==",
|
||||
"dev": true
|
||||
},
|
||||
"cipher-base": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
|
||||
|
@ -1178,6 +1184,12 @@
|
|||
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
|
||||
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
|
||||
},
|
||||
"husky": {
|
||||
"version": "0.14.3",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz",
|
||||
"integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==",
|
||||
"dev": true
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
|
||||
|
@ -1245,6 +1257,12 @@
|
|||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
},
|
||||
"is-ci": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz",
|
||||
"integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=",
|
||||
"dev": true
|
||||
},
|
||||
"is-data-descriptor": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
|
||||
|
@ -1666,6 +1684,12 @@
|
|||
"resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz",
|
||||
"integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA=="
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz",
|
||||
"integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=",
|
||||
"dev": true
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
|
@ -2289,6 +2313,12 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz",
|
||||
"integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428="
|
||||
},
|
||||
"strip-indent": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
|
||||
"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
|
||||
"dev": true
|
||||
},
|
||||
"subarg": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
"scripts": {
|
||||
"build": "node ./node_modules/gulp/bin/gulp.js build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"watch": "node ./node_modules/gulp/bin/gulp.js watch"
|
||||
"watch": "node ./node_modules/gulp/bin/gulp.js watch",
|
||||
"precommit": "npm run-script build && git add js/bundle.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^0.14.3"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue