Created
May 29, 2014 19:44
-
-
Save dgmike/adcde1bd8b72d881c3d0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/*jslint node: true*/ | |
var grunt = require('grunt'), | |
gruntFile = require('./Gruntfile.js'), | |
task, | |
tasks; | |
gruntFile(grunt); | |
task = process.argv.length > 2 ? process.argv[2] : ''; | |
task = task.split(':'); | |
task.pop(); | |
tasks = grunt.config.data; | |
task.forEach(function (item) { | |
"use strict"; | |
if (tasks.hasOwnProperty(item)) { | |
tasks = tasks[item]; | |
} | |
}); | |
console.log('tasks: ' + Object.keys(tasks).join(' ')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment