sidebase / create-sidebase

Create a Nuxt 3 web application with the sidebase stack
MIT License
25 stars 3 forks source link

feat: Enable user to choose their preferred package manager #6

Closed JohannesMogashoa closed 1 year ago

JohannesMogashoa commented 1 year ago

Enable users to choose their preferred package manager (npm, yarn, pnpm). Preview of how this looks:

image

Other .

Checklist:

BracketJohn commented 1 year ago

Hey @JohannesMogashoa 👋

Thanks for the contribution ❤️ Can you give a brief rationale of why this change is necessary / helpful? Users can already invoke create-sidebase with npm, yarn, ... and it will "just work TM". What is the use-case for allowing the user to invoke the CLI with npm and then choosing pnpm?

JohannesMogashoa commented 1 year ago

Hi there @BracketJohn 👋🏽 Much appreciated. So you are correct in saying that it is not a necessary or much-needed change but I feel it to be to an extent somewhat a "nice-to-have". If the individual chooses to install the tool globally and not execute npm create-sidebase at every project creation, npm will become default. I say this because I have all three package managers and on occasion, I like switching them so I thought it to be an advantage if I can select whichever package manager I want even if I decide to init this using npm or yarn or pnpm.

BracketJohn commented 1 year ago

Thanks for the thoughful response @JohannesMogashoa and sorry for taking some time to get back to you here.

I get your point, but I do not think that this use-case is frequent enough to warrant an extra step in the CLI:

In addition even if setting it up with npm but then wanting to switch to pnpm is easy:

  1. Remove package-lock.json / pnpm-lock.yaml
  2. Run {pnpm, yarn, npm} install

So the use-case only applies to <5% of users PLUS the mitigation that these 5% of users can apply is quite straight forward.

Based on this, I do not want to land this PR at the moment. Sorry for that and sorry for the time you invested on something that now will not fully be used. I very very very much appreaciate you taking the initiative and opening a PR - it was really a great moment for us.

In the future, you can open an issue first or ping us on discord (https://discord.gg/NDDgQkcv3s) to ask: "Hey, do you think X is a good idea?" and get earlier feedback this way.

Hope that all makes sense to you, have an amazing day & week, BracketJohn