re: Setting up a Minimal, Yet Useful JavaScript Dev Environment VIEW POST


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.

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 :)

code of conduct - report abuse