mweststrate / relative-deps

Installs local dependencies for optimal developer experience
MIT License
428 stars 32 forks source link

Add `npm` support #5

Closed mweststrate closed 4 years ago

mweststrate commented 5 years ago

Currently only yarn is supported (or tested at least). npm would be great to have as well.

If someone cares enough about it to make it happen :)

elektronik2k5 commented 5 years ago

Possibly using this: https://github.com/camacho/yarn-or-npm

rifler commented 5 years ago

Possibly using this: camacho/yarn-or-npm

Great lib!

It checks installation of yarn or npm on specific computer, but I think it is more correct to check specific project.

If project top directory has yarn.lock - project uses yarn and user have to install yarn on his computer; If it has package-lock.json - project uses npm; If there is no lock file - npm ?

elektronik2k5 commented 5 years ago

@rifler yeah, I think that's a better heuristic than what yarn-or-npm had last time I used it (which was over a year ago). I'd raise that issue upstream (perhaps there is such an issue already?).

rifler commented 5 years ago

https://github.com/camacho/yarn-or-npm/issues/4

camacho commented 5 years ago

A new version of the yarn-or-npm package (v3.0.0) just shipped. It adds support for using a project's client depending on the lockfile, and then falling back to the old behavior of checking if Yarn is installed or not.

mweststrate commented 4 years ago

Solved in 1.0.2