Getting started

Requirements

The following tools must be installed to use the plugin:

The plugin is built and tested on Linux, Mac OS, Windows (see the list of build environments used in the contributing notes).

Supported distributions

Steps

  1. Install the plugin.
    • Using Gradle DSL (recommended)

      plugins {
          // For JDK 17+
          id 'org.siouan.frontend-jdk17' version '8.0.0'
          // For JDK 11+
          id 'org.siouan.frontend-jdk11' version '8.0.0'
      }
      plugins {
          // For JDK 17+
          id("org.siouan.frontend-jdk17") version "8.0.0"
          // For JDK 11+
          id("org.siouan.frontend-jdk11") version "8.0.0"
      }
    • Using Gradle build script block

      buildscript {
          repositories {
              url 'https://plugins.gradle.org/m2/'
          }
          dependencies {
              // For JDK 17+
              classpath 'org.siouan:frontend-gradle-plugin-jdk17:8.0.0'
              // For JDK 11+
              classpath 'org.siouan:frontend-gradle-plugin-jdk11:8.0.0'
          }
      }
      
      // For JDK 17+
      apply plugin: 'org.siouan.frontend-jdk17'
      // For JDK 11+
      apply plugin: 'org.siouan.frontend-jdk11'
      buildscript {
          repositories {
              url = uri("https://plugins.gradle.org/m2/")
          }
          dependencies {
              // For JDK 17+
              classpath("org.siouan:frontend-gradle-plugin-jdk17:8.0.0")
              // For JDK 11+
              classpath("org.siouan:frontend-gradle-plugin-jdk11:8.0.0")
          }
      }
      
      // For JDK 17+
      apply(plugin = "org.siouan.frontend-jdk17")
      // For JDK 11+
      apply(plugin = "org.siouan.frontend-jdk11")
  2. Define the packageManager property in the package.json file.
  3. Add .frontend-gradle-plugin/ directory to .gitignore file(s).
  4. Configure your project, optionally with the help of examples provided for typical use cases.
  5. Run gradlew build.
  6. If you need to run node/corepack/npm/pnpm/yarn executables from a command line (e.g. to start a development server), take a look at the FAQ.