precommit

v1.0.0
Yet another precommit module that will run tasks defined in a config file or in a `package.json` file, stashing anything that is not supposed to be commited before run the scripts to avoid false positives when running validation like tasks
pre-commit precommit hooks git hooks enforce git workflow

beautify

esbeautifier 'lib/**/*.js' 'bin/**/*.js' 'hook/**/*.js'

beautify-check

esbeautifier -k 'lib/**/*.js' 'bin/**/*.js' 'hook/**/*.js'

eslint

eslinter 'lib/**/*.js' 'bin/**/*.js' 'hook/**/*.js'

test

mocha-runner 'specs/**/*.js'

cover

istanbul cover -x 'specs/**/*.js' mocha-runner 'specs/**/*.js' html text-summary

watch

npm run cover && watch-spawn -p 'specs/**/*.js' -p 'lib/**/*.js' -p 'hook/**/*.js' -p 'bin/**/*.js' npm run cover

check

npm run beautify-check && npm run eslint

lint

npm run beautify && npm run eslint

prepush

npm run check && npm test

changelog

changelogx -f markdown -o ./changelog.md

do-changelog

npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog'

install-hooks

prepush install && changelogx install-hook && ./bin/cli.js install

pre-v

npm run check

post-v

npm run do-changelog && git push --no-verify && git push --tags --no-verify

bump-major

npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v

bump-minor

npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v

bump-patch

npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v

Metadata

  • MIT
  • Whatever
  • Roy Riojas
  • released 7/29/2015

Downloads

Maintainers