Skip to content

Document args parameter missing from AddJavaScriptApp API #86

@eerhardt

Description

@eerhardt

Documentation issue: args parameter for AddJavaScriptApp API

Related to dotnet/aspire#13087:

The documentation for the AddJavaScriptApp API does not mention the absence of support for the args parameter, which was present in AddNpmApp in Aspire 9. Developers may be confused when trying to migrate code and find that args is missing, leading to workarounds or confusion.

Background

In Aspire 9, the following was possible:

builder.AddNpmApp("hasura-console", "../Web/ClientApp", scriptName: "hasura:console", args: ["--no-browser"])

In Aspire 13:

// builder.AddJavaScriptApp("hasura-console", "../Web/ClientApp", runScriptName: "hasura:console", args: ["--no-browser"]) // args param not found
builder.AddJavaScriptApp("hasura-console", "../Web/ClientApp", runScriptName: "hasura:console") // must omit args

Proposal

Update documentation for AddJavaScriptApp to clearly call out the absence of the args parameter and, if possible, recommend workarounds:

  • Show how developers can create a script in package.json for custom arguments.
  • Clarify migration steps from AddNpmApp to AddJavaScriptApp regarding args.

Impact

This will help clarify the API migration process for users and avoid confusion.


See original feature request and workaround details: dotnet/aspire#13087

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions