|
11 | 11 | "es-check": "index.js"
|
12 | 12 | },
|
13 | 13 | "scripts": {
|
14 |
| - "chore:delete-branch": "if git show-ref --quiet refs/heads/chore-changelog; then git branch -D chore-changelog; fi", |
15 |
| - "chore:branch": "git checkout -b chore-changelog", |
16 |
| - "chore:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", |
17 |
| - "chore:pr": "git add . && git commit -m '[chore] updates changelog' --no-verify && git push origin chore-changelog -f", |
18 |
| - "chore": "pnpm run chore:delete-branch && pnpm run chore:branch && pnpm run chore:changelog && pnpm run chore:pr", |
| 14 | + "commit": "git-cz", |
| 15 | + "commit-msg": "commitlint --edit $1", |
| 16 | + "husky-setup": "if [[ ! -d /.husky/commit-msg ]]; then (husky install && pnpm husky-setup:commit-msg && pnpm husky-setup:post-merge && pnpm husky-setup:pre-commit); fi", |
| 17 | + "husky-setup:commit-msg": "npx husky add .husky/commit-msg 'pnpm run commit-msg'", |
| 18 | + "husky-setup:post-merge": "npx husky add .husky/post-merge 'pnpm run setup'", |
| 19 | + "husky-setup:pre-commit": "npx husky add .husky/pre-commit 'pnpm run pre-commit'", |
19 | 20 | "lint": "eslint index.js --fix",
|
20 | 21 | "lint:ci": "eslint index.js",
|
21 |
| - "prepush": "pnpm run lint && pnpm test", |
22 |
| - "postpublish": "git tag $npm_package_version && git push origin --tags && pnpm run chore", |
| 22 | + "pre-commit": "pnpm lint && pnpm test", |
| 23 | + "prepare": "is-ci || pnpm husky-setup", |
| 24 | + "prepublishOnly": "pnpm test", |
| 25 | + "release": "release-it", |
23 | 26 | "report:coverage": "nyc report --reporter=lcov > coverage.lcov && codecov",
|
| 27 | + "setup": "pnpm install --reporter=silent", |
24 | 28 | "test": "nyc mocha test.js --timeout 10s --coverage"
|
25 | 29 | },
|
26 | 30 | "repository": {
|
|
45 | 49 | "husky": "^8.0.1",
|
46 | 50 | "mocha": "^10.0.0",
|
47 | 51 | "nyc": "^15.1.0",
|
48 |
| - "prettier": "^2.5.1" |
| 52 | + "prettier": "^2.5.1", |
| 53 | + "release-it": "^15.1.3" |
49 | 54 | },
|
50 | 55 | "dependencies": {
|
51 | 56 | "acorn": "^8.7.0",
|
|
86 | 91 | 120
|
87 | 92 | ]
|
88 | 93 | }
|
89 |
| - }, |
90 |
| - "husky": { |
91 |
| - "hooks": { |
92 |
| - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", |
93 |
| - "post-checkout": "if [[ $HUSKY_GIT_PARAMS =~ 1$ ]]; then pnpm i -r; fi", |
94 |
| - "post-merge": "pnpm i -r", |
95 |
| - "post-rewrite": "pnpm i -r", |
96 |
| - "pre-commit": "pnpm test && pnpm lint" |
97 |
| - } |
98 | 94 | }
|
99 | 95 | }
|
0 commit comments