diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..9078cf7 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --extends=@commitlint/config-angular --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..d37daa0 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install lint-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..e8ecc9a --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm t diff --git a/.huskyrc b/.huskyrc deleted file mode 100644 index 52557c1..0000000 --- a/.huskyrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "hooks": { - "pre-push": "npm t", - "pre-commit": "lint-staged", - "commit-msg": "commitlint --extends=@commitlint/config-angular -e" - } -} \ No newline at end of file diff --git a/package.json b/package.json index 0b091e4..68de4b0 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "standard": "^16.0.2" }, "scripts": { + "prepare": "husky install", "version": "conventional-changelog -i changelog.md -s -r 0 && git add changelog.md", "test": "c8 mocha", "docs:api": "jsdoc2md lib/api.js > docs/api.md", diff --git a/readme.md b/readme.md index ba6536f..abbe3e3 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,7 @@ [![NPM][npm]][npm-url] -[![Deps][deps]][deps-url] [![Tests][build]][build-url] [![Coverage][cover]][cover-url] [![Standard Code Style][code-style]][code-style-url] -[![Twitter][twitter]][twitter-url] # PostHTML @@ -392,9 +390,6 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com [npm]: https://img.shields.io/npm/v/posthtml.svg [npm-url]: https://npmjs.com/package/posthtml -[deps]: https://david-dm.org/posthtml/posthtml.svg -[deps-url]: https://david-dm.org/posthtml/posthtml - [build]: https://github.com/posthtml/posthtml/workflows/Actions%20Status/badge.svg?style=flat-square [build-url]: https://github.com/posthtml/posthtml/actions?query=workflow%3A%22CI+tests%22 @@ -404,9 +399,6 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com [code-style]: https://img.shields.io/badge/code%20style-standard-yellow.svg [code-style-url]: http://standardjs.com/ -[twitter]: https://badgen.net/twitter/follow/posthtml -[twitter-url]: https://twitter.com/PostHTML - [chat]: https://badges.gitter.im/posthtml/PostHTML.svg [chat-url]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" [docs-url]: https://github.com/posthtml/posthtml/tree/master/docs