Example: build a Javascript application using a preinstalled Node.js distribution.
This example demonstrates how to configure a Gradle project to build a Javascript application.
- A Gradle Wrapper configured in this directory.
- Preinstalled distribution of Node.js on the workstation.
- Either set the value of the
preinstalledNodeDistributionDirectory
variable in thebuild.gradle.kts
file, or define aFGP_NODEJS_HOME
environment variable pointing to the Node.js installation directory.
settings.gradle.kts
: defines version of used plugins.build.gradle.kts
: applies and configures the plugin.package.json
: scripts connected to Gradle lifecycle tasksclean
,assemble
,check
.
Enter gradlew nodeVersion npmVersion build
on a command line and verify outputs of each task.