ericclemmons / ericclemmons/per-env

Doesn't allow use of yarn instead of npm

Open
#16 1 comment 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
134
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I believe it would be beneficial to allow the use of yarn instead of npm based on what the user ran the initial script command with.

This is possible through the `npm_execpath` environment variable. When using `yarn start` it points to the yarn javascript file like: `C:\\Program Files (x86)\\Yarn\\bin\\yarn.js`. Whereas, with `npm start`, it points to the npm cli javascript file: `C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js`.

You can run these two package managers interchangeably for running scripts, for example `node ${npm_execpath} run start:development` would work for either yarn or npm.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.