Skip to content

Commit c6e9368

Browse files
Copilotaaronpowell
andauthored
Fix outdated NodeJS Extensions documentation - update package installation examples to use callback API (#815)
* Initial plan * Fix outdated NodeJS Extensions documentation - update package installation examples to use callback API instead of array API Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
1 parent e38b9ad commit c6e9368

File tree

1 file changed

+12
-3
lines changed
  • src/CommunityToolkit.Aspire.Hosting.NodeJS.Extensions

1 file changed

+12
-3
lines changed

src/CommunityToolkit.Aspire.Hosting.NodeJS.Extensions/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,26 @@ You can pass additional flags to package managers during installation:
3131
```csharp
3232
// npm with legacy peer deps support
3333
builder.AddNpmApp("npm-app", "./path/to/app")
34-
.WithNpmPackageInstallation(useCI: false, args: ["--legacy-peer-deps"])
34+
.WithNpmPackageInstallation(useCI: false, configureInstaller =>
35+
{
36+
configureInstaller.WithArgs("--legacy-peer-deps");
37+
})
3538
.WithExternalHttpEndpoints();
3639

3740
// yarn with frozen lockfile
3841
builder.AddYarnApp("yarn-app", "./path/to/app")
39-
.WithYarnPackageInstallation(args: ["--frozen-lockfile", "--verbose"])
42+
.WithYarnPackageInstallation(configureInstaller =>
43+
{
44+
configureInstaller.WithArgs("--frozen-lockfile", "--verbose");
45+
})
4046
.WithExternalHttpEndpoints();
4147

4248
// pnpm with frozen lockfile
4349
builder.AddPnpmApp("pnpm-app", "./path/to/app")
44-
.WithPnpmPackageInstallation(args: ["--frozen-lockfile"])
50+
.WithPnpmPackageInstallation(configureInstaller =>
51+
{
52+
configureInstaller.WithArgs("--frozen-lockfile");
53+
})
4554
.WithExternalHttpEndpoints();
4655
```
4756

0 commit comments

Comments
 (0)