Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

JavaScriptAppResource.WithBuildScript

Method
📦 Aspire.Hosting.JavaScript v17.0.0
type JavaScriptAppResource interface {
// ... omitted for brevity
WithBuildScript(
scriptName string,
options ...*WithBuildScriptOptions,
) JavaScriptAppResource
}

Signature

methodWithBuildScriptbuilder
Adds a build script annotation to the resource builder using the specified command-line arguments.
WithBuildScript(
scriptName string,
options ...*WithBuildScriptOptions,
) JavaScriptAppResource
scriptNamestringThe name of the script to be executed when the resource is built.
options...*WithBuildScriptOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithBuildScriptOptions argument.

Args[]stringAn array of command-line arguments to use for the build script.
JavaScriptAppResource

The same resource builder instance with the build script annotation applied.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: