grunt-cli icon indicating copy to clipboard operation
grunt-cli copied to clipboard

List tasks as json

Open segrey opened this issue 9 years ago • 1 comments
trafficstars

In order to list all available tasks with their dependencies, a custom task should be defined and registered via --tasks option. For instance, now WebStorm uses this code. Tasks are listed using this command:

grunt --gruntfile .../Gruntfile.js --tasks .../tasks _intellij_grunt_tasks_fetcher

It's not convenient to rely on internal Grunt API. Is it possible to add a new cli option that will output tasks with dependencies as json? Thanks.

segrey avatar May 04 '16 08:05 segrey

Also, that would fix https://github.com/gruntjs/grunt/issues/1303. Now, _intellij_grunt_tasks_fetcher is run even if Gruntfile has syntax errors making it harder for tools to show an actual error.

segrey avatar May 04 '16 08:05 segrey