JavaScriptHostingExtensions.WithPnpm<TResource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the Node.js resource to use pnmp as the package manager and optionally installs packages before the application starts.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<TResource> WithPnpm<TResource>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<TResource> resource, bool install = true, string[]? installArgs = default) where TResource : Aspire.Hosting.JavaScript.JavaScriptAppResource;
static member WithPnpm : Aspire.Hosting.ApplicationModel.IResourceBuilder<'Resource (requires 'Resource :> Aspire.Hosting.JavaScript.JavaScriptAppResource)> * bool * string[] -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'Resource (requires 'Resource :> Aspire.Hosting.JavaScript.JavaScriptAppResource)> (requires 'Resource :> Aspire.Hosting.JavaScript.JavaScriptAppResource)
<Extension()>
Public Function WithPnpm(Of TResource As JavaScriptAppResource) (resource As IResourceBuilder(Of TResource), Optional install As Boolean = true, Optional installArgs As String() = Nothing) As IResourceBuilder(Of TResource)
Type Parameters
- TResource
Parameters
- resource
- IResourceBuilder<TResource>
The NodeAppResource.
- install
- Boolean
When true (default), automatically installs packages before the application starts. When false, only sets the package manager annotation without creating an installer resource.
- installArgs
- String[]
The command-line arguments passed to "pnpm install".
Returns
A reference to the IResourceBuilder<T>.