This looks like a practical setup for small modules, will definitely try it out. What exactly does the precommit package do? Im looking for a solution for automated test runs before certain scripts with webpack/babel.
The only thing precommit package do, is running all the scripts listed in package.json, eg. "pre-commit": ["test", "lint"] before every git commit command.
When you install it, it sets up everything for you, so that you don't need to do or remember anything.
"pre-commit": ["test", "lint"]
Sounds good, does it cancel operation commit in case of not successful command execution, like 'test' etc?
That's exactly how it works. There is --no-verify flag (which is a default git flag, rather than any other library thing), but I doesn't recommend using it if you wish to push your commits :)
Sounds great. Thank you!
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.