feat(new): support to skip install
If I run command nest new some-project (some one new may don't know --skip-install option), nest-cli always force me to select a package manager. I have to press ctrl + c to skip, which is not elegant. Otherwise I have to waste my time to wait it.
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
Should we update this new option to say "none (skip installing packages)" instead of just "none" as one (newcomers to JS world) can think there's a "none" package manager? 😅
Should we update this new option to say "none (skip installing packages)" instead of just "none" as one (newcomers to JS world) can think there's a "none" package manager? 😅
@kamilmysliwiec Good idea. Done now.
@micalevisk I found it's not very elegant. I will convert this PR to draft. The elegant way is asking user 2 questions:
- Which package manager would you like to use?
- npm
- yarn
- pnpm
- Install packages now?
- Yes
- No
The first question is to generate README.md. The second question is to skip installing or not.
What your opinion? @micalevisk @kamilmysliwiec @jmcdo29
having two questions is better for sure.
@micalevisk I found it's not very elegant. I will convert this PR to draft. The elegant way is asking user 2 questions:
- Which package manager would you like to use?
- npm
- yarn
- pnpm
- Install packages now?
- Yes
- No
The first question is to generate README.md. The second question is to skip installing or not.
What your opinion? @micalevisk @kamilmysliwiec @jmcdo29
After PR #1457 being accepted, I will implement this feature.
IMO the fewer questions we could ask the better (to make the scaffolding process as straightforward & quick as possible)
IMO the fewer questions we could ask the better (to make the scaffolding process as straightforward & quick as possible)
Got it. And I found #1457 has code conflict with this PR. After that PR being accepted, I will rebase and ask for review again.
to make the scaffolding process as straightforward & quick as possible
that's a good point acctually. Then, I go back to https://github.com/nestjs/nest-cli/pull/1458#discussion_r772528899 xD
This should be feasible now (since we merged https://github.com/nestjs/nest-cli/pull/1803)