nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

feat(new): support to skip install

Open zanminkian opened this issue 2 years ago • 9 comments

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?

image

Issue Number: N/A

What is the new behavior?

image

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

zanminkian avatar Dec 17 '21 15:12 zanminkian

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 avatar Dec 20 '21 07:12 kamilmysliwiec

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.

zanminkian avatar Dec 20 '21 09:12 zanminkian

@micalevisk I found it's not very elegant. I will convert this PR to draft. The elegant way is asking user 2 questions:

  1. Which package manager would you like to use?
  • npm
  • yarn
  • pnpm
  1. 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

zanminkian avatar Dec 21 '21 03:12 zanminkian

having two questions is better for sure.

micalevisk avatar Dec 21 '21 04:12 micalevisk

@micalevisk I found it's not very elegant. I will convert this PR to draft. The elegant way is asking user 2 questions:

  1. Which package manager would you like to use?
  • npm
  • yarn
  • pnpm
  1. 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.

zanminkian avatar Dec 21 '21 09:12 zanminkian

IMO the fewer questions we could ask the better (to make the scaffolding process as straightforward & quick as possible)

kamilmysliwiec avatar Dec 21 '21 09:12 kamilmysliwiec

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.

zanminkian avatar Dec 21 '21 09:12 zanminkian

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

micalevisk avatar Dec 21 '21 12:12 micalevisk

This should be feasible now (since we merged https://github.com/nestjs/nest-cli/pull/1803)

kamilmysliwiec avatar Dec 27 '22 11:12 kamilmysliwiec