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.

build.gradle
plugins {
  id 'org.ysb33r.nodejs.base'    version '4.0.0'  (1)
  id 'org.ysb33r.nodejs.npm'     version '4.0.0'  (2)
  id 'org.ysb33r.nodejs.gulp'    version '4.0.0'  (3)
  id 'org.ysb33r.nodejs.cmdline' version '4.0.0'  (4)
  id 'org.ysb33r.nodejs.wrapper' version '4.0.0'  (5)
  id 'org.ysb33r.nodejs.dev'     version '4.0.0'  (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:

NPM plugin

The NPM plugin provides:

  • npm extension.

  • NpmTask type.

  • npmexec project extension to run NPM commands.

  • npm, npmDevOnly, npmOptional, npmPeer configurations.

  • npmPackage for listing packages in Gradle dependencies blocks.

  • NpmExecSpec.

Applying the NPM plugin will apply the base plugin.

Gulp plugin

The Gulp plugin provides:

  • gulp project and task extensions

  • GulpTask task type.

Applying the Gulp plugin will apply the NPM plugin.

Other quick starts