Skip to content

NpmAssembleTask

Summary

A task to assemble all required files for a given NpmPackage. The task can be created and configured in a build.gradle.kts file by registering it with correct type.

build.gradle.kts
1
2
3
4
5
tasks {
  register("name", dev.petuska.npm.publish.task.NpmAssembleTask::class) {
    ...
  }
}

Properties

Property Type Default When Kotlin plugin is present
package NpmPackage
destinationDir Directory $buildDir/packages/<package.name>
Property CLI System/Gradle Environment
package
destinationDir --destinationDir
build.gradle.kts
1
2
3
4
5
6
7
8
tasks {
  register("name", dev.petuska.npm.publish.task.NpmAssembleTask::class) {
    `package` {
      ...
    }
    destinationDir.set(layout.buildDirectory.dir("js/main"))
  }
}

package

The configuration of the package to assemble.

destinationDir

Output directory to assemble the package to.