Skip to content

Commit 73b487b

Browse files
committed
chore(ghooks): add ghooks
1 parent f20b69b commit 73b487b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ before_install:
1212
before_script:
1313
- npm prune
1414
script:
15-
- npm run clean
16-
- npm run build
17-
- npm run test
15+
- npm run build-and-test
1816
after_success:
1917
- npm run semantic-release
2018
branches:

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"clean": "rimraf src/**/*.js src/**/*.js.map",
99
"build": "tsc -p src",
1010
"test": "karma start",
11+
"build-and-test": "npm run clean && npm run build && npm run test",
1112
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1213
},
1314
"repository": {
@@ -32,6 +33,7 @@
3233
"devDependencies": {
3334
"commitizen": "^2.4.6",
3435
"cz-conventional-changelog": "^1.1.5",
36+
"ghooks": "^1.0.1",
3537
"jasmine-core": "^2.4.1",
3638
"karma": "^0.13.15",
3739
"karma-jasmine": "^0.3.6",
@@ -44,6 +46,9 @@
4446
"config": {
4547
"commitizen": {
4648
"path": "node_modules/cz-conventional-changelog"
49+
},
50+
"ghooks": {
51+
"pre-commit": "npm run build-and-test"
4752
}
4853
}
4954
}

0 commit comments

Comments
 (0)