RubyMine 7.0.1 Web Help

File | Settings | Node.js and NPM

settings

This page appears in the Settings dialog box, when the Node.js plugin is enabled.

The plugin is not bundled with RubyMine, but it is available from the RubyMine plugin repository. Once enabled, the plugin is available at the IDE level, that is, you can use it in all your RubyMine projects. See Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins for details.

Item Description
Node.js interpreter Specify here the path to the Node.js executable.
Version This read-only field shows the current version of the framework.
Sources of Node.js core module When developing a Node.js application it can be convenient to have code completion, reference resolution, validation, and debugging capabilities for Node core modules (fs\, path, http, etc.). However, these modules are compiled into the Node.js binary. RubyMine provides the ability to configure these sources as a JavaScript library and associate it with your project.
  • If the Node.js core module sources are not set up, RubyMine displays a notification and a Configure button. Click this button to configure Node.js core sources in the Setting Up Node.js Sources dialog box that opens.
  • If the library is set up, RubyMine displays information about the currently configured version, and an Edit usage scope link. Click this link to associate the desired directories with libraries.
Packages A number of tools are started through Node.js, for example, the CoffeeScript, TypeScript, and LESS transpilers, YUI, UglifyJS, and Closure compressors, Karma test runner, Grunt task runner, etc. The Node Package Manager (npm) is the easiest way to install these tools, the more so that you have to install Node.js anyway. The Packages area shows a list of all the NPM-dependent packages that are currently installed on your computer.
  • Package: this read-only field shows the name of a package, exactly as it should be referenced if you were installing it in the command line mode.
  • Version: this read-only field shows the version of the package installed on your computer.
  • Latest: this read-only field shows the latest released version of the package. If a package is not up-to-date, it is marked with a blue arrow arrow_right.
  • Click add to have a new package installed. In the Available Packages dialog box that opens, select the relevant package. To have the package installed globally, select the Options check box and type -g in the Options text box. Global installation makes the package available at the RubyMine level so it can be used in any RubyMine project. Click Install Package when ready.
  • Click delete to have the selected package removed.
  • Click arrowUp to have the current version of the selected package replaced with the latest released version. The button is enabled only when the selected project is not up-to-date.
  • Index internal Node modules

    A Node.js project has at least one node_modules folder under the project root. Under this folder all the Node.js-dependent packages are grouped. Each package also contains a node_modules folder with its dependencies, etc. As a result, you have a multilevel tree of packages. Most of these internal packages only support the work of the corresponding packages but are not used in your development, that is, you do not reference them in your source code and therefore you do not need reference resolution, syntax highlighting, and other types of coding assistance for them.

    Taking into account that coding assistance is provided based on a project index, it becomes clear that it is not necessary to index the packages of all the levels except the packages grouped in the node_modules folder under the project root because only for them you actually need coding assistance. This approach is applied by default for the sake of performance.

    To have all the packages indexed, including the internal packages, select the Index internal Node modules check box.

See Also

Language and Framework-Specific Guidelines:

Web Resources: