Bootstrapping
These plugins are available from the plugin portal.
Add the appropriate plugin identifiers to your build.gradle file depending on the type of functionality you require.
Ecosystem plugins
plugins {
id 'org.ysb33r.jsecosystem.core.base' version '5.0.0-alpha.3' (1)
id 'org.ysb33r.jsecosystem.node.base' version '5.0.0-alpha.3' (2)
id 'org.ysb33r.jsecosystem.pnpm.base' version '5.0.0-alpha.3' (3)
}
| 1 | Adds the jsEcosystem extension only. |
| 2 | Adds the ability to add node toolchains. |
| 3 | Adds the ability to add pnpm toolchains. |
Classic plugins
plugins {
id 'org.ysb33r.nodejs.base' version '5.0.0-alpha.3' (1)
id 'org.ysb33r.nodejs.npm' version '5.0.0-alpha.3' (2)
id 'org.ysb33r.nodejs.gulp' version '5.0.0-alpha.3' (3)
id 'org.ysb33r.nodejs.cmdline' version '5.0.0-alpha.3' (4)
id 'org.ysb33r.nodejs.wrapper' version '5.0.0-alpha.3' (5)
id 'org.ysb33r.nodejs.dev' version '5.0.0-alpha.3' (6)
}
| 1 | Base plugin |
| 2 | Support for using NPM |
| 3 | Support for using Gulp |
| 4 | Support running commands like node from the command-line with arguments. See running commands from command-line. |
| 5 | Create wrappers for node, npm and npx. See creating wrappers. |
| 6 | Use Gradle to manage your Node.js project development. |
Base plugin
The base plugin provides:
-
nodeexec execution extension.
-
Ability to download and use Node distributions.
NPM plugin
The NPM plugin provides:
-
NpmTask type.
-
npmexecproject extension to run NPM commands. -
npm,npmDevOnly,npmOptional,npmPeerconfigurations. -
npmPackagefor listing packages in Gradledependenciesblocks. -
NpmExecSpec.
Applying the NPM plugin will apply the base plugin.
Gulp plugin
The Gulp plugin provides:
-
gulpproject and task extensions -
GulpTasktask type.
Applying the Gulp plugin will apply the NPM plugin.
Other quick starts
-
I want to run a tool built in Node, but I don’t want to node Javascript development: Using a Javascript-based tool.
-
I want to wrap an existing Javascript tools and present it as part of a plugin: Wrapping NPM packages.
-
I want to manage my Javascript project with Gradle: Developing with Node.js.