jondot / hygen-add

hygen-add is one of the tools in the Hygen toolbelt which allows you to add pre-made generator packages to your project.
MIT License
14 stars 4 forks source link

Allow using globally installed npm/yarn #4

Open novascreen opened 5 years ago

novascreen commented 5 years ago

I think it makes sense to use a bundled yarn instance under certain circumstances. Not everybody uses this in the context of a project with a package.json. However if you do, it would be nice if hygen-add could check for an existing yarn.lock or package-lock.json and based on that use the local instance of npm or yarn. It's not ideal if you use npm and get a package added by yarn. It could also just be an extra argument e.g. npmClient. If you're open to this addition, i'd be happy to do a PR.