Last active
December 31, 2015 21:59
-
-
Save marcusellis05/8050184 to your computer and use it in GitHub Desktop.
Simple Node script for calling Grunt tasks without the CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var grunt = require('grunt') | |
, args = process.argv.slice(2) | |
, tasks = ['build']; | |
if (args && args.length){ | |
tasks = args; | |
} | |
grunt.cli.tasks = tasks; | |
grunt.cli(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the default task is "build", so calling:
with no arguments will run the "build" alias. if you don't have an alias named "build", you may want to change line 5 of this script accordingly.