Share via


JavaScriptHostingExtensions Class

Definition

Provides extension methods for adding JavaScript applications to an IDistributedApplicationBuilder.

public static class JavaScriptHostingExtensions
type JavaScriptHostingExtensions = class
Public Module JavaScriptHostingExtensions
Inheritance
JavaScriptHostingExtensions

Methods

AddJavaScriptApp(IDistributedApplicationBuilder, String, String, String)

Adds a JavaScript application resource to the distributed application using the specified app directory and run script.

AddNodeApp(IDistributedApplicationBuilder, String, String, String)

Adds a node application to the application model. Node should be available on the PATH.

AddViteApp(IDistributedApplicationBuilder, String, String, String)

Adds a Vite app to the distributed application builder.

WithBuildScript<TResource>(IResourceBuilder<TResource>, String, String[])

Adds a build script annotation to the resource builder using the specified command-line arguments.

WithNpm<TResource>(IResourceBuilder<TResource>, Boolean, String, String[])

Configures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.

WithPnpm<TResource>(IResourceBuilder<TResource>, Boolean, String[])

Configures the Node.js resource to use pnmp as the package manager and optionally installs packages before the application starts.

WithRunScript<TResource>(IResourceBuilder<TResource>, String, String[])

Adds a run script annotation to the specified JavaScript application resource builder, specifying the script to execute and its arguments during run mode.

WithYarn<TResource>(IResourceBuilder<TResource>, Boolean, String[])

Configures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.

Applies to