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 262466 - Allow Opening of NPM Modules through IDE in tree view
Summary: Allow Opening of NPM Modules through IDE in tree view
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-17 13:13 UTC by dylanv
Modified: 2016-07-02 12:56 UTC (History)
1 user (show)

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 dylanv 2016-06-17 13:13:22 UTC
Netbeans already lists all the NPM Libraries under the "npm Libraries" folder node in the project tree view. The problem is that you cannot do anything with the entries listed there. It would be very handy if the IDE would open the main entry file of each library that is defined in each library's respective package.json file.
Comment 1 Tomas Mysik 2016-06-20 04:52:29 UTC
Nice idea, we could perhaps add an action "Open main file".

Thanks for reporting.
Comment 2 dylanv 2016-07-02 12:56:14 UTC
that would be great, but even double clicking the file at this point would be great, because you cannot even right click it o_O? On that note, there really should be a right click and I basically inherently expect to see the following:

* uninstall module (if it is an npm module (other such modules include symlinks which are not directly controlled by NPM))
* update (won't work for symlinks)
* upgrade (will bump the version)

I also would love to see the IDE get really smart and allow us to add custom aliases which can resolve to custom module paths. This kind of relates to issue: https://netbeans.org/bugzilla/show_bug.cgi?id=262659 where I have a require() that points to a module that doesn't exist. If this sub-feature was added, it should appear here as a different Color.

The biggest issue here that Netbeans just really needs to understand, is that because of the nature of javascript projects, we really REALLY need much more configurability with these projects at a module level. Almost every single developer I work with, tends to work with javascript slightly differently so things like this are a must have.

Other things that can affect the type of module, and thus how the module is displayed in the libraries node include: .babelrc, package.json and variables inside the package.json such as the browserify fields which make the module a browserify plugin.