object SbtJsTask extends AutoPlugin
The commonality of JS task execution oriented plugins is captured by this class.
- Alphabetic
- By Inheritance
- SbtJsTask
- AutoPlugin
- PluginsFunctions
- Basic
- Plugins
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
JsTaskFailure extends RuntimeException
Thrown when there is an unexpected problem to do with the task's execution.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&&(o: Basic): Plugins
- Definition Classes
- Basic → Plugins
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addJsSourceFileTasks(sourceFileTask: TaskKey[Seq[sbt.File]]): Seq[sbt.Setting[_]]
Convenience method to add a source file task into the Asset and TestAsset configurations, along with adding the source file tasks in to their respective collection.
Convenience method to add a source file task into the Asset and TestAsset configurations, along with adding the source file tasks in to their respective collection.
- sourceFileTask
The task key to declare.
- returns
The settings produced.
-
def
allRequirements: PluginTrigger
- Definition Classes
- PluginsFunctions
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoImport: JsTaskImport.type
-
def
buildSettings: Seq[sbt.Def.Setting[_]]
- Definition Classes
- AutoPlugin
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
derivedProjects(proj: ProjectDefinition[_]): Seq[Project]
- Definition Classes
- AutoPlugin
-
def
empty: Plugins
- Definition Classes
- PluginsFunctions
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
executeJs(state: State, engineType: JsEngineImport.JsEngineKeys.EngineType.Value, command: Option[sbt.File], nodeModules: Seq[String], shellSource: sbt.File, args: Seq[String], stderrSink: Option[(String) ⇒ Unit] = None, stdoutSink: Option[(String) ⇒ Unit] = None): Seq[JsValue]
Execute some arbitrary JavaScript.
Execute some arbitrary JavaScript.
This method is intended to assist in building SBT tasks that execute generic JavaScript. For example:
myTask := { executeJs(state.value, engineType.value, Seq((nodeModules in Plugin).value.getCanonicalPath, baseDirectory.value / "path" / "to" / "myscript.js", Seq("arg1", "arg2")) }- state
The SBT state.
- engineType
The type of engine to use.
- command
An optional path to the engine.
- nodeModules
The node modules to provide (if the JavaScript engine in use supports this).
- shellSource
The script to execute.
- args
The arguments to pass to the script.
- stderrSink
A callback to handle the sctipr's error output.
- stdoutSink
A callback to handle the sctipr's normal output.
- returns
A JSON status object if one was sent by the script. A script can send a JSON status object by, as the last thing it does, sending a DLE character (0x10) followed by some JSON to std out.
-
def
extraProjects: Seq[Project]
- Definition Classes
- AutoPlugin
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
globalSettings: Seq[sbt.Def.Setting[_]]
- Definition Classes
- AutoPlugin
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
jsSourceFileTask(task: TaskKey[Seq[sbt.File]], config: sbt.Configuration): sbt.Def.Initialize[Task[Seq[sbt.File]]]
Primary means of executing a JavaScript shell script for processing source files.
Primary means of executing a JavaScript shell script for processing source files. unmanagedResources is assumed to contain the source files to filter on.
- task
The task to resolve js task settings from - relates to the concrete plugin sub class
- config
The sbt configuration to use e.g. Assets or TestAssets
- returns
A task object
- val jsTaskSpecificUnscopedBuildSettings: Seq[sbt.Setting[_]]
- val jsTaskSpecificUnscopedConfigSettings: Seq[sbt.Def.Setting[_ >: File with Task[OpInputHasher[File]] <: Serializable]]
- val jsTaskSpecificUnscopedProjectSettings: Seq[sbt.Setting[_]]
-
val
label: String
- Definition Classes
- AutoPlugin
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
noTrigger: PluginTrigger
- Definition Classes
- PluginsFunctions
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
projectConfigurations: Seq[Configuration]
- Definition Classes
- AutoPlugin
-
def
projectSettings: Seq[sbt.Setting[_]]
- Definition Classes
- SbtJsTask → AutoPlugin
- Annotations
- @nowarn()
-
def
requires: Plugins
- Definition Classes
- SbtJsTask → AutoPlugin
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AutoPlugin → AnyRef → Any
-
def
trigger: PluginTrigger
- Definition Classes
- SbtJsTask → AutoPlugin
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
object
JsTaskProtocol extends DefaultJsonProtocol
For automatic transformation of Json structures.
Deprecated Value Members
-
def
executeJs(state: State, engineType: JsEngineImport.JsEngineKeys.EngineType.Value, command: Option[sbt.File], nodeModules: Seq[String], shellSource: sbt.File, args: Seq[String], timeout: FiniteDuration): Seq[JsValue]
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.0) Use the other executeJs instead
-
val
jsTaskSpecificUnscopedSettings: Seq[sbt.Setting[_]]
- Annotations
- @deprecated
- Deprecated
(Since version 1.2.0) Add jsTaskSpecificUnscopedProjectSettings to AutoPlugin.projectSettings and jsTaskSpecificUnscopedBuildSettings to AutoPlugin.buildSettings