Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

JavaScriptAppResource.WithYarn

Method
📦 Aspire.Hosting.JavaScript v17.0.0
type JavaScriptAppResource interface {
// ... omitted for brevity
WithYarn(options ...*WithYarnOptions) JavaScriptAppResource
}

Signature

methodWithYarnbuilder
Configures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.
WithYarn(options ...*WithYarnOptions) JavaScriptAppResource
options...*WithYarnOptionsOptional settings, described under Options.

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

Install*boolWhen true (default), automatically installs packages before the application starts. When false, only sets the package manager annotation without creating an installer resource.
InstallArgs[]stringThe command-line arguments passed to "yarn install".
JavaScriptAppResource

The resource builder.

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

Defined on

This method is defined on the following type: