Azure / Azure/static-web-apps-cli
swa init --yes should consider yarn.lock
- Dominant language
- TypeScript
- Stars
- 668
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
**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"
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.