Imagine that you're tweaking some part of svg.js and as the responsible person you are, you made sure to run npm test before pushing. Unfortunately npm test tests the current dist/svg.js which only has your edits if you first did npm run build.
This has happen to me a couple of times and as a svg.js contributor, it's embarrassing.
Fortunately git has a pre-push hook which can save yourself from the embarrassment.
I have created a pre-commit hook that will build a new dist/svg.js and run the tests. It's developed on Ubuntu 16.04 but should work on all *nix platforms. You can disable this check with git push --no-verify
pre-commit
A failed push looks something like this:
Install
Put pre-commit in your local svg.js repository, in the .git/hooks folder and make it executable sudo chmod +x .git/hooks/pre-push.
To disable the check when you push, write git push --no-verify.
Happy coding - dotnetCarpenter