Skip to content

Commit

Permalink
feat(zhi-dist): add husky
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Apr 17, 2023
1 parent c3af589 commit 7eec462
Show file tree
Hide file tree
Showing 5 changed files with 622 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
3 changes: 2 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
],
"preset": "angular",
"changelogFile": "CHANGELOG.md",
"prepareCmd": "conventional-changelog-atom -p atom -i CHANGELOG.md -s -r 0",
"prepareCmd": "conventional-changelog -p angular -i CHANGELOG.md -s",
"debug": true,
"dryRun": true,
"ci": true
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"extends": ["@commitlint/config-conventional"]
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@
"reset": "git pull origin main --force && git rm .",
"recover": "unzip /Users/terwer/Downloads/zhi-dist.zip -d /Users/terwer/Documents/mydocs/zhi-dist && git add -A",
"log": "git-changelog -c angular --sections feat,fix,refactor,chore,docs -t angular -T -o CHANGELOG.md",
"tag": "git push --tags"
"tag": "git push --tags",
"prepare": "husky install",
"test": "echo hello"
},
"devDependencies": {
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^10.0.3",
"husky": "^8.0.3",
"semantic-release": "^21.0.1"
}
}
}
Loading

0 comments on commit 7eec462

Please sign in to comment.