Gilp: A node tool to implement pre-commit and other git hooks over gulp
Git has a lot of hooks for client and server side but the most used and known hook is pre-commit, where you can run some validations (like linters) and cancel a commit if something fails. Gilp is a tool to define (using gulp tasks), install and run hooks.
Why gilp over gulp?
There are 2 main reasons:
The regular pre-commit hook managers run using the local file's content instead of git staged content. Gulp comes with
vinyl, a virtual file format where we can create an in-memory version of a file to use as content for the tasks. Like
gulp.src, we created a new stream provider for that:
srcFromStaged. If we need to run the same tools but over a
taginstead (e.g. in a CI), you can do it using
Gulp has plenty of plugins ready to use, check here.