nxpm / stack

🥭 nxpm-stack lets you generate a complete and opinionated full-stack application in a Nx Workspace, ready to extend and deploy!
https://npm.im/@nxpm/stack
MIT License
108 stars 14 forks source link

Support different package managers (npm/pnpm/cnpm) #64

Open johannesschobel opened 3 years ago

johannesschobel commented 3 years ago

Dear @beeman ,

thank you very much for this awesome (!) boiler plate code for webbased applications. I really like it - been following you for some time and just stumbled upon these generators.

Expected Behavior

I noticed, that the commands within the executors require yarn. Same with the inserted scripts in the package.json file. Can we make yarn optional? i.e., if i would like to use npm, scripts need to be rewritten (i.e., npm run x instead of yarn x)

Thank you very much for your time & help

beeman commented 3 years ago

Hi @johannesschobel, thanks for kind words, and for taking the time to check out @nxpm/stack.

I'd love to give you a little context about the status of the project and it's future.

The state of this project is currently more or less proof of concept (which I think totally validated itself!). With this in mind, I took quite a few shortcuts to make that happen, picking yarn as the package manager of choice is one of them.

I'll be rebuilding @nxpm/stack using Nx 11 and in that new structure it should be much easier to add new features and options. However, for moving to Nx 11 I'm currently blocked on this issue, once that's fixed I can start migrating my stack.

Now with regards to this specific question: I'm definitely open to support other package managers, and if this change is added I want to make sure to not only support npm, but also make sure pnpm and cnpm work.

I'm happy to help you land a PR that adds this, but it might be smart to wait a little bit until it's running on Nx 11. Because whatever gets added to @nxpm/stack now, also needs to be migrated.

I hope this answers your question.

johannesschobel commented 3 years ago

Dear @beeman ,

thank you very much for your very fast answer on this issue. Good to hear, that you are planning to support other package manager as well. Maybe you could use the default package manager that is specified in the workspace.json (i believe!). Nrwl already has such a configuration flag - maybe there is an API for that as well?

Regarding the migration process: Do you have an estimated timeframe for the migration? I know, that you are currently blocked by a nrwl issue, however, as far as i have seen, this only affects tests, right?

All the best and thanks for your time / effort on this