Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

JavaScriptAppResource.WithRunScript

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

Signature

methodWithRunScriptbuilder
Adds a run script annotation to the specified JavaScript application resource builder, specifying the script to execute and its arguments during run mode.
WithRunScript(
scriptName string,
options ...*WithRunScriptOptions,
) JavaScriptAppResource
scriptNamestringThe name of the script to be executed when the resource is run.
options...*WithRunScriptOptionsOptional settings, described under Options.

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

Args[]stringAn array of arguments to pass to the script.
JavaScriptAppResource

The same resource builder instance with the run script annotation applied, enabling further configuration.

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

Defined on

This method is defined on the following type: