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 244805 - Gruntfile in site root not found in when mapping tasks to actions
Summary: Gruntfile in site root not found in when mapping tasks to actions
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Tools (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-30 09:07 UTC by Vladimir Riha
Modified: 2014-10-06 13:06 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 Vladimir Riha 2014-05-30 09:07:16 UTC
If you want to map Grunt tasks to context menu actions in IDE, Gruntfile must be in project root. But if Gruntfile is in e.g. site root, if you go to project properties->Grunt, IDE says that "Gruntfile.js not found". Would it be possible to enable having Gruntfile anywhere in project?

Perhaps input field to specify Gruntfile location with Browse button (by default, IDE select Gruntfile.js if found in project root, but user can use Browse to select Gruntfile anywhere - Karma has similar settings)

This would be also useful for issue 244747 where (in case of e.g. PHP project), Gruntfile could be in some nested folder (e.g. folder named "client").

Thank you


Product Version: NetBeans IDE Dev (Build 201405300001)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Jan Becicka 2014-05-30 14:50:37 UTC
(In reply to Vladimir Riha from comment #0)
> If you want to map Grunt tasks to context menu actions in IDE, Gruntfile
> must be in project root. But if Gruntfile is in e.g. site root,

Do you have project with this layout? Having gruntfile in siteroot is wrong imo.

 
> This would be also useful for issue 244747 where (in case of e.g. PHP
> project), Gruntfile could be in some nested folder (e.g. folder named
> "client").

And the client folder is in fact HTML5 Project, right?
Comment 2 Vladimir Riha 2014-05-30 15:35:10 UTC
I tend to avoid mixing NB projects if there is no benefit in doing so (but that is purely personal reason, doesn't mean anything) and if I have "client" folder in PHP project, it is really just a folder and I'd put Grunt file there instead of directly to sources folder. If it's possible to run tasks from Gruntfile in site root, why not this mapping as well ? 

I can imagine e.g. when creating a module for NodeJS, one would like to have site root == project root in a new project but that need some extra actions so why not put it to site root instead... I'm looking at [1] for instead - if you want to create a new HTML5 project with similar structure you would probably prefer to see folders like static, tasks, scripts in site root (because it is visible in Projects view)

But I really don't have a strong opinion, if you disagree or think it's not worth doing, I won't object :)



[1] https://github.com/karma-runner/karma