|
3 | 3 | "version": "0.0.0-semantic-release",
|
4 | 4 | "description": "react tooltip component",
|
5 | 5 | "main": "dist/index.js",
|
6 |
| - "types": "react-tooltip.d.ts", |
| 6 | + "types": "dist/react-tooltip.d.ts", |
7 | 7 | "module": "dist/index.es.js",
|
8 | 8 | "jsnext:main": "dist/index.es.js",
|
9 | 9 | "engines": {
|
|
15 | 15 | "test:unit": "mocha --require @babel/register --require ignore-styles 'test/*.spec.js'",
|
16 | 16 | "clean": "rimraf dist",
|
17 | 17 | "build:rollup": "rollup -c",
|
18 |
| - "build": "npm-run-all test:unit build:rollup", |
| 18 | + "build": "npm-run-all clean copy:types build:rollup", |
19 | 19 | "build:watch": "rollup -c -w",
|
20 | 20 | "start": "npm-run-all clean build:watch",
|
21 | 21 | "gh-pages": "gh-pages -d example",
|
22 | 22 | "github-changes": "github-changes -o wwayne -r react-tooltip -a --only-pulls --use-commit-body",
|
| 23 | + "copy:types": "cpy './react-tooltip.d.ts' './dist' --parents --dot", |
23 | 24 | "cm": "git cz",
|
24 | 25 | "semantic-release": "semantic-release"
|
25 | 26 | },
|
|
28 | 29 | "path": "node_modules/cz-conventional-changelog"
|
29 | 30 | }
|
30 | 31 | },
|
| 32 | + "commitlint": { |
| 33 | + "extends": [ |
| 34 | + "@commitlint/config-conventional" |
| 35 | + ] |
| 36 | + }, |
31 | 37 | "repository": {
|
32 | 38 | "type": "git",
|
33 | 39 | "url": "https://github.com/wwayne/react-tooltip"
|
|
74 | 80 | "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
|
75 | 81 | "@babel/plugin-syntax-import-meta": "^7.8.3",
|
76 | 82 | "@babel/register": "^7.8.3",
|
| 83 | + "@commitlint/cli": "^8.3.5", |
| 84 | + "@commitlint/config-conventional": "^8.2.0", |
| 85 | + "@commitlint/travis-cli": "^8.3.5", |
77 | 86 | "@rollup/plugin-commonjs": "^11.0.2",
|
78 | 87 | "@rollup/plugin-node-resolve": "^7.1.1",
|
79 | 88 | "@semantic-release/changelog": "^5.0.0",
|
|
93 | 102 | "chai-spies": "^1.0.0",
|
94 | 103 | "commitizen": "2.9.6",
|
95 | 104 | "concurrently": "^2.1.0",
|
| 105 | + "cpy-cli": "^3.1.0", |
96 | 106 | "cz-conventional-changelog": "2.1.0",
|
97 | 107 | "enzyme": "^2.3.0",
|
98 | 108 | "enzyme-adapter-react-16": "^1.15.2",
|
|
109 | 119 | "eslint-plugin-standard": "^4.0.1",
|
110 | 120 | "gh-pages": "1.1.0",
|
111 | 121 | "github-changes": "^1.1.2",
|
| 122 | + "husky": "^3.1.0", |
112 | 123 | "http-server": "^0.11.1",
|
113 | 124 | "ignore-styles": "5.0.1",
|
114 | 125 | "jsdom": "^9.2.1",
|
|
142 | 153 | },
|
143 | 154 | "files": [
|
144 | 155 | "dist"
|
145 |
| - ] |
| 156 | + ], |
| 157 | + "husky": { |
| 158 | + "hooks": { |
| 159 | + "pre-commit": "yarn test:unit", |
| 160 | + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" |
| 161 | + } |
| 162 | + } |
146 | 163 | }
|
0 commit comments