Skip to content

horaklukas/vcs-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VCS Hooks

Build Status

Version control system hooks that can help you when developing javascript project.

Hooks

Pre commit

don't let you commit if any of commited files contain

  1. debugger statement
  2. focused jasmine test (fit statement) or test unit (fdescribe statement)

Installation

Install package

npm install -g horaklukas/vcs-hooks 

or

yarn global add horaklukas/vcs-hooks

Use vcs-hooks bin to instal files into repository, eg.

vcs-hooks /srv/git/my-repo

or

 vcs-hooks C:/mercurial/my-repo

Relative paths instead of absolute can be used as well.

If from any reason is not possible, you can try manual installation, but use it as a last option in case automatic install does not work.

Support

Currently supported VCS:

  • Git
  • Mercurial

Skip hook

If from any reason is desired to not run hooks, modify VCS command.

Pre commit

For Git add --no-verify option, for example

git commit -a --no-verify -m 'New features'

For Mercurial add --config 'hooks.precommit=' option, eg.

hg commit --addremove --config 'hooks.precommit=' -m 'Fix bugs'

TODO

  • installation script

About

VCS hooks useful in software development

Resources

Stars

Watchers

Forks

Packages

No packages published