Created
July 5, 2014 15:09
-
-
Save Unitech/fdc9c36d96ce64ab494f to your computer and use it in GitHub Desktop.
List grunt task and exec
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
var grunt = require('grunt'); | |
var gruntfile = require('./Gruntfile.js')(grunt); | |
var tasks = grunt.task._tasks; | |
var tasks_array = []; | |
for (var task in tasks) { | |
if (tasks.hasOwnProperty(task)) { | |
console.log(tasks[task].name); | |
tasks_array.push(tasks[task].name); | |
} | |
} | |
/*grunt.util.spawn({ | |
grunt: true, | |
args: ['dist'] | |
}, function(err, res, code) { | |
console.log(arguments); | |
});*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment