Skip to content

Instantly share code, notes, and snippets.

@jamesmusgrave
Last active January 3, 2016 14:09
Show Gist options
  • Save jamesmusgrave/8474722 to your computer and use it in GitHub Desktop.
Save jamesmusgrave/8474722 to your computer and use it in GitHub Desktop.
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