This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245010 - Add list of available tasks as tree nodes under the Gruntfile as for ant scripts.
Summary: Add list of available tasks as tree nodes under the Gruntfile as for ant scri...
Status: CLOSED INVALID
Alias: None
Product: javascript
Classification: Unclassified
Component: Tools (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@javascript
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-12 08:35 UTC by Christian Lenz
Modified: 2020-07-05 11:17 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2014-06-12 08:35:03 UTC
At the moment, I only see the tasks when I do a right click on the gruntfile and then click on Grunt Tasks. What I would prefer is the same feature as we have it for ant scripts (build.xml for example) as you can see it here: https://netbeans.org/images_www/v7/3/features/ide-buildtools-ant-full.png

That would be a nice to have so the tree nodes could be still open and I don't have to use right click and so on.

What I would like to see/have is that the grunt tasks could be listed in the Navigator or in an separate build navigator or whatever, as you can see it here: http://wiki.netbeans.org/wiki/images/2/20/ANTLR_without_Ant_AfterClean.png (In the left down corner).

These things would be very handy :)


Regards

Chris
Comment 1 Jan Becicka 2014-07-03 14:11:45 UTC
Also this RFE is still valid, there is new option in current dev builds: you can map grunt tasks to NetBeans actions: e.g. you can map some task to Build actions, some other tasks to Clean etc... so you don't need to click to grunt tasks that often.
Comment 2 Christian Lenz 2014-07-06 21:32:30 UTC
I know these options to map build, clean to grunt tasks and I love it :). But what is for grunt serve, mini/uglify, karma and so on? At the moment, those tasks where handled standalone and you don't need grunt for such tasks. But if you can map build and clean to grunt tasks, why not others?

An other thing is, sometimes, if you build your own gruntfile and some tasks breaks, you will go through each task to test what happens and so on, so you do grunt copy, grunt uglify, grunt karma, grunt cssmin, grunt whatever and therefore an list of the grunt tasks as a tree node as we have it for ant files, would be very nice, and for the navigator too. Only my opinion :)


Regards

Chris
Comment 3 Jan Becicka 2014-07-07 07:51:04 UTC
(In reply to ChrisLE from comment #2)
> I know these options to map build, clean to grunt tasks and I love it :).
> But what is for grunt serve, mini/uglify, karma and so on? At the moment,
> those tasks where handled standalone and you don't need grunt for such
> tasks. But if you can map build and clean to grunt tasks, why not others?

Technically speaking you can map others. This option is not officially supported, but you can give it a try: 
go to your projectroot/nbproject/project.properties and add mapping by hand. For instance add this line

grunt.action.test=build test

It will map "grunt build test" to Test Action.

The format is
grunt.action._name_of_action_=_list_of_grunt_tasks

_name_of_action_ needs to ne one of those defined here http://hg.netbeans.org/web-main/file/7a0fbd006c11/projectapi/src/org/netbeans/spi/project/ActionProvider.java


As I wrote. This is unsupported, but maybe it will work for you.

> An other thing is, sometimes, if you build your own gruntfile and some tasks
> breaks, you will go through each task to test what happens and so on, so you
> do grunt copy, grunt uglify, grunt karma, grunt cssmin, grunt whatever and
> therefore an list of the grunt tasks as a tree node as we have it for ant
> files, would be very nice, and for the navigator too. Only my opinion :)

Sure. This issue is still valid and still open.
Comment 4 Christian Lenz 2014-07-07 08:44:37 UTC
Thx for the feedback. I would like to see it like here: http://i.imgur.com/VYimgqN.png but directly as a tree node as for ant files.


Regards

Chris
Comment 5 Christian Lenz 2016-01-13 08:21:07 UTC
Geertjan created a plugin for gulp tasks as tree nodes: https://github.com/GeertjanWielenga/Gulp

I think he will not work on this plugin anymore, but I can fork it and can bring it back, because this is exactly what I want for a Gulp file and this is the same what I really want for the Grunt file.

What I figured out is, when I have a maven project and I select it in the project window, the navigator shows me the goals from the pom which I can exectue on double click or right click -> "execute goal". This should be done for a HTML5 project with grunt and/or gulp too. So all grunt tasks should have a node called Grunt with all tasks and a node named Gulp with tasks. So that I can use it when I select the project. A nice to have is to have a dropDownList where you can say I would like to show grunt tasks, show gulp tasks or both.
Comment 6 Christian Lenz 2016-04-29 11:53:05 UTC
Grunt and Gulp tasks will come to the navigator in Netbeans 8.2 (Wuhu). And I'm working on a plugin to create nodes for gulp, grunt tasks, npm scripts and typescript typings. https://github.com/Chris2011/NbTasks/tree/develop. Grunt is the only one, atm which is not working, but it will soon ;).
Comment 7 Petr Pisl 2016-04-29 12:43:42 UTC
This sounds great.
Comment 8 Christian Lenz 2020-07-05 11:17:15 UTC
As I mentioned, the work is not done yet and it was postponed for some other priorities. But I will definetely work on it again. You can follow me on my repo and create tickets there.