Skip to content

Commit 6e95d2d

Browse files
committed
build(hooks): use husky instead of precommit
use husky instead of precommit, and add validate-commit-msg
1 parent ad5f0b8 commit 6e95d2d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Build Status](https://travis-ci.org/jedwards1211/es2015-library-skeleton.svg?branch=master)](https://travis-ci.org/jedwards1211/es2015-library-skeleton)
44
[![Coverage Status](https://coveralls.io/repos/github/jedwards1211/es2015-library-skeleton/badge.svg?branch=master)](https://coveralls.io/github/jedwards1211/es2015-library-skeleton?branch=master)
55
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
67

78
This is my personal skeleton for creating an ES2015 library npm package. You are welcome to use it.
89

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@
1414
"copy-flow-files": "cd src; copy *.js.flow **/*.js.flow ../lib",
1515
"build": "rimraf lib && babel src --out-dir lib",
1616
"test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
17+
"commitmsg": "validate-commit-msg",
18+
"precommit": "npm run lint && flow",
19+
"prepush": "npm test",
1720
"prepublish": "npm run lint && flow && npm test && npm run build && npm run copy-flow-files",
1821
"open:coverage": "open coverage/lcov-report/index.html",
1922
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
2023
},
2124
"config": {
22-
"mocha": "--compilers js:babel-core/register ./test/**/*.js"
25+
"mocha": "--compilers js:babel-core/register ./test/**/*.js",
26+
"commitizen": {
27+
"path": "cz-conventional-changelog"
28+
}
2329
},
2430
"nyc": {
2531
"include": [
@@ -65,16 +71,13 @@
6571
"eslint-watch": "^2.1.14",
6672
"flow-bin": "^0.36.0",
6773
"flow-watch": "^1.1.0",
74+
"husky": "^0.12.0",
6875
"istanbul": "^0.4.5",
6976
"mocha": "^3.2.0",
7077
"nyc": "^10.0.0",
71-
"pre-commit": "^1.1.3",
7278
"rimraf": "^2.5.4",
73-
"semantic-release": "^6.3.2"
79+
"semantic-release": "^6.3.2",
80+
"validate-commit-msg": "^2.8.2"
7481
},
75-
"dependencies": {},
76-
"pre-commit": [
77-
"lint",
78-
"flow"
79-
]
82+
"dependencies": {}
8083
}

0 commit comments

Comments
 (0)