Closed vivaxy closed 5 years ago
yarn
npm i -g package
Showing npm i -g package or yarn add package --global
yarn add package --global
Showing yarn add package
yarn add package
It's better to have the logic as:
if (installed package with yarn global) { return 'yarn add package --global' } if (installed package with npm global) { return 'npm i -g package' } if (has yarn) { return 'yarn add package' } return 'npm i package'
Environment
yarn
installednpm i -g package
Expected behaviour
Showing
npm i -g package
oryarn add package --global
Actual behaviour
Showing
yarn add package
Discussion
It's better to have the logic as: