moleculerjs / moleculer-cli

:herb: Command line tool for Moleculer
http://moleculer.services/docs/moleculer-cli.html
MIT License
48 stars 28 forks source link

add ability to install dependencies with npm or yarn #65

Open Karnith opened 1 year ago

Karnith commented 1 year ago

The current install process for templates uses npm only to install dependencies after initializing a project by template as seen below: https://github.com/moleculerjs/moleculer-cli/blob/bf2dabf2014a854ad5149c6444b77c76d70df41f/src/init/index.js#L260-L268

What I propose is that this be modified to look for a yarn.lock file provided in the template, if a yarn.lock is not found then default to npm install. This change should be relatively simple and will allow those users that use yarn to have dependencies installed with yarn when prompted if dependencies should be installed. Currently users that use yarn init a template then must select no to installing dependencies in order to then install them via yarn, this change would bring the experience of using yarn inline with users using npm.