Aspire.Hosting.JavaScript
Official
📦 Aspire.Hosting.JavaScriptv13.4.017Functions
5Types
5 types and 0 members
Types
Functions
method
addBunAppbuilderAdds a Bun application to the application model. Bun should be available on the PATH.
addBunApp(name: string, appDirectory: string, scriptPath: string): BunAppResourcemethod
addJavaScriptAppbuilderAdds a JavaScript application resource to the distributed application using the specified app directory and run script.
addJavaScriptApp(name: string, appDirectory: string, runScriptName?: string): JavaScriptAppResourcemethod
addNextJsAppbuilderAdds a Next.js app to the distributed application builder.
addNextJsApp(name: string, appDirectory: string, runScriptName?: string): NextJsAppResourcemethod
addNodeAppbuilderAdds a node application to the application model. Node should be available on the PATH.
addNodeApp(name: string, appDirectory: string, scriptPath: string): NodeAppResourcemethod
addViteAppbuilderAdds a Vite app to the distributed application builder.
addViteApp(name: string, appDirectory: string, runScriptName?: string): ViteAppResourcemethod
disableBuildValidationbuilderDisables deploy-time build validation checks for the Next.js application.
disableBuildValidation(): NextJsAppResourcemethod
publishAsNodeServerbuilderConfigures the JavaScript application to publish as a standalone Node.js server that runs a built artifact directly.
publishAsNodeServer(entryPoint: string, outputPath?: string): JavaScriptAppResourcemethod
publishAsPackageScriptbuilderConfigures the JavaScript application to publish as a Node.js server that uses a `package.json` script at runtime.
publishAsPackageScript(scriptName?: string, runScriptArguments?: string): JavaScriptAppResourcemethod
publishAsStaticWebsitebuilderPublishes the JavaScript application as a standalone static website using YARP.
publishAsStaticWebsite(apiPath?: string, apiTarget?: IResourceWithServiceDiscovery, outputPath?: string, stripPrefix?: boolean, targetEndpointName?: string): JavaScriptAppResourcemethod
withBrowserDebuggerbuilderConfigures a browser debugger for the JavaScript application resource, enabling browser-based debugging through a child resource that launches when the parent application is ready.
withBrowserDebugger(browser?: string): JavaScriptAppResourcemethod
withBuildScriptbuilderAdds a build script annotation to the resource builder using the specified command-line arguments.
withBuildScript(scriptName: string, args?: string[]): JavaScriptAppResourcemethod
withBunbuilderConfigures the JavaScript resource to use Bun as the package manager and optionally installs packages before the application starts.
withBun(install?: boolean, installArgs?: string[]): JavaScriptAppResourcemethod
withNpmbuilderConfigures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.
withNpm(install?: boolean, installCommand?: string, installArgs?: string[]): JavaScriptAppResourcemethod
withPnpmbuilderConfigures the Node.js resource to use pnpm as the package manager and optionally installs packages before the application starts.
withPnpm(install?: boolean, installArgs?: string[]): JavaScriptAppResourcemethod
withRunScriptbuilderAdds 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, args?: string[]): JavaScriptAppResourcemethod
withViteConfigbuilderConfigures the Vite app to use the specified Vite configuration file instead of the default resolution behavior.
withViteConfig(configPath: string): ViteAppResourcemethod
withYarnbuilderConfigures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.
withYarn(install?: boolean, installArgs?: string[]): JavaScriptAppResource