Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Grunt on pre-commit
#!/bin/sh
# Pre-commit file needs to be executable so first
# chmod +x .git/hooks/pre-commit
# Fix your grunt path
PATH="/usr/local/bin:$PATH"
# Runs grunt default
echo "Running Grunt..."
grunt
# Adds changed files to the commit
git add "js/app.min.js"
git add "css/global.css"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment