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 244747 - Grunt support available in other project types
Summary: Grunt support available in other project types
Status: STARTED
Alias: None
Product: javascript
Classification: Unclassified
Component: Tools (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 14:59 UTC by Martin Fousek
Modified: 2014-10-06 13:06 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
sample PHP app with grunt support (328.62 KB, application/zip)
2014-05-27 14:59 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2014-05-27 14:59:07 UTC
Created attachment 147471 [details]
sample PHP app with grunt support

Product Version: NetBeans IDE Dev (Build 20140527-17d2b7bb03ba)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Linux version 3.11.0-12-generic running on amd64; UTF-8; en_US (nb)

Currently we are able to use Grunt build tool within the HTML project including its great support for project context menu, mapping actions, action before run etc. I think that it would have sense to support Grunt within another project types as well.

I'm attaching sample PHP project. You can switch between `grunt development` vs. `grunt publish` tasks there.

Feel free to turn this into the enhancement. Thanks a lot.
Comment 1 Tomas Mysik 2014-05-27 15:40:39 UTC
Also, in the context menu, I see only "Default" task. Is it OK?

Thanks.
Comment 2 Martin Fousek 2014-05-27 18:04:35 UTC
(In reply to Tomas Mysik from comment #1)
> Also, in the context menu, I see only "Default" task. Is it OK?

Definitely not. When I copy&paste the build script sources into HTML project, all tasks are loaded properly. Should it be reported as a new issue or is it also related to Grunt support focused only to HTML area?
Comment 3 Jan Becicka 2014-05-28 07:39:37 UTC
(In reply to Tomas Mysik from comment #1)
> Also, in the context menu, I see only "Default" task. Is it OK?

And what happens, if you run this default task?
Comment 4 Tomas Mysik 2014-05-28 07:46:13 UTC
(In reply to Jan Becicka from comment #3)
> And what happens, if you run this default task?

As expected, the default task is run. Try it yourself, it is easy ;)
Comment 5 Jan Becicka 2014-05-28 08:03:41 UTC
(In reply to Tomas Mysik from comment #4)
> (In reply to Jan Becicka from comment #3)
> > And what happens, if you run this default task?
> 
> As expected, the default task is run. Try it yourself, it is easy ;)

If I tried it myself, I'm getting:
Fatal error: Unable to find local grunt.

This why I was asking.

So I need to go to command line and do
npm install

When I go back to NB, list of grunt task is still cached and the only way how to force reload is to modify Gruntfile.js (e.g. just hit space). 

Now if I go to Grunt Tasks again, I can see all tasks.
This is known issue 244650
Comment 6 Jan Becicka 2014-07-03 13:34:07 UTC
http://hg.netbeans.org/web-main/rev/6687ab257f78
Grunt action is now available also for php project, maven and web. But action mapping is up to module owners.
Comment 7 Martin Fousek 2014-07-03 13:37:13 UTC
(In reply to Jan Becicka from comment #6)
> http://hg.netbeans.org/web-main/rev/6687ab257f78
> Grunt action is now available also for php project, maven and web. But
> action mapping is up to module owners.

Great, thanks a lot.
Comment 8 Tomas Mysik 2014-07-07 05:15:14 UTC
(In reply to Jan Becicka from comment #6)
> But action mapping is up to module owners.

Why? I thought that this belongs to Bower more than to e.g. PHP project. Or am I wrong? Sorry if yes, I am not expert in this area.

Thanks.
Comment 9 Tomas Mysik 2014-07-07 05:15:49 UTC
(In reply to Tomas Mysik from comment #8)
> Bower

I meant Grunt, of course.
Comment 10 Jan Becicka 2014-07-07 07:19:51 UTC
(In reply to Tomas Mysik from comment #8)
> (In reply to Jan Becicka from comment #6)
> > But action mapping is up to module owners.
> 
> Why? I thought that this belongs to Bower more than to e.g. PHP project. Or
> am I wrong? Sorry if yes, I am not expert in this area.

For instance PHP Project (afaik) does not have Build, Clean and Build & Clean actions. To have those actions available PHP Project needs to add those actions to it's ActionProvider. I doubt, that I'm available to do this outside of PHP Project.
But maybe this is the only issue.
Comment 11 Tomas Mysik 2014-07-07 08:00:58 UTC
(In reply to Jan Becicka from comment #10)
> For instance PHP Project (afaik) does not have Build, Clean and Build &
> Clean actions. To have those actions available PHP Project needs to add
> those actions to it's ActionProvider. I doubt, that I'm available to do this
> outside of PHP Project.

I see now, thanks. Let's wait for feedback from our users, the current situation will be perhaps OK.

Thanks!