Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithBuildScript

Method
📦 Aspire.Hosting.JavaScript v17.0.0
func (JavaScriptAppResource) 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().

Applies to

This method applies to the following types: