AndersDJohnson / use-yarn

Force users to use yarn instead of npm.
https://andersdjohnson.github.io/use-yarn/
ISC License
50 stars 12 forks source link

Feature request: print the correct yarn command in error message #8

Closed muescha closed 3 years ago

muescha commented 5 years ago

it should print the correct yarn command in error message.

for example when i copy paste from some documentation or tutorials:

npm install mypackage --save-dev

it should print out:

you can use yarn with this command:

yarn add mypackage --dev
AndersDJohnson commented 5 years ago

@muescha That is a cool idea. Would you be interested in opening a pull request?

AndersDJohnson commented 3 years ago

I believe preinstall hook we wire up use-yarn with may only run for npm install alone and not on npm install [pkg] for specific packages. So I'm not sure this is feasible at this time. 😢