Azure / Azure/static-web-apps-cli

swa init --yes should consider yarn.lock

Offen
#657 1 Kommentar 2 Reaktionen 1 zugewiesene Person Beansprucht von @Reshmi-Sriram Auf GitHub ansehen
command: init type: enhancement
Vorherrschende Sprache
TypeScript
Sterne
668
Forks
156
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Are you accessing the CLI from the default port `:4280` ?**

- [x] Yes, I am accessing the CLI from port `:4280`

**Describe the bug**
If `yarn.lock` exists, `swa init --yes` should use `yarn` instead of `npm`

**To Reproduce**
```bash
yarn create next-app # accept all defaults
cd my-app
swa init -y
cat .\swa-cli.config.json
{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"my-app": {
"appLocation": ".",
"outputLocation": ".next",
"appBuildCommand": "npm run build",
"run": "npm run dev",
"appDevserverUrl": "http://localhost:3000"
}
}
}
```

**Expected behavior**
```bash
cat .\swa-cli.config.json
{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"my-app": {
"appLocation": ".",
"outputLocation": ".next",
"appBuildCommand": "yarn build",
"run": "yarn dev",
"appDevserverUrl": "http://localhost:3000"
}
}
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.