Aggregating and uglifying javascript in a git pre-commit hook
问题 I'm using ready.js to aggregate JS files into an all.js file (without Google's Closure Compiler), and then using uglify-js to minify and obfuscate the code. I'd like to do all of this in a pre-commit hook. However, I think I'm doing something wrong. My .git/hooks/pre-commit file looks like this: #!/bin/sh readyjs ~/Sites/backbone/js/javascripts/ ~/Sites/backbone/js/ --nojslint -o "underscore.js, backbone.js" --nocompiler uglifyjs -nm -o ~/Sites/backbone/js/all.min.js ~/Sites/backbone/js/all