io.github.kelvindev15.gradle.NpmScriptTask.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of npm-gradle-plugin Show documentation
Show all versions of npm-gradle-plugin Show documentation
A Gradle plugin to manage npm projects
package io.github.kelvindev15.gradle
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
import org.gradle.kotlin.dsl.property
/**
* The task to run a npm command.
*/
open class NpmScriptTask : NpmTask() {
/**
* The script to run.
*/
@Input
val script: Property = project.objects.property()
@TaskAction
override fun exec() {
arguments("run", script.get())
super.exec()
}
}