Skip to content

Instantly share code, notes, and snippets.

@soundstep
Created August 15, 2013 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soundstep/6243683 to your computer and use it in GitHub Desktop.
Save soundstep/6243683 to your computer and use it in GitHub Desktop.
Auto install (preinstall) grunt-cli from package.json
{
"name": "Project name",
"version": "0.0.0",
"author": "Author name",
"scripts": {
"preinstall": "which -s grunt && grunt --version | grep grunt-cli > /dev/null 2>&1; if [[ \"$?\" != 0 ]]; then npm install grunt-cli -g; exit 0; fi"
},
"devDependencies": {
"grunt": "~0.4.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment