[cli] Support installing dependencies with yarn
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
Provide a way for new projects to use yarn over npm for installing dependencies.
### Use Case
I primarily use yarn for all my projects, so when starting new cdk projects I have to delete the package.lock and node modules and reinstall using yarn.
### Proposed Solution
It seems like the project by default uses yarn in its codebase, so maybe default to using yarn if it's there, and if not use npm.
Another option is to provide a flag on the init command that will indicate if to use yarn.
### Other
I'd like to get feedback on the approach before I start a PR for this.
* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start at the CLI's init command and trace how a new project currently installs dependencies and creates package-lock.json or node_modules. Decide whether the supported behavior is a yarn option, automatic detection, or both; done means a new project can be initialized with yarn without manual cleanup, with tests covering the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100