Closed abetomo closed 6 years ago
Thanks, but I would rather leave this as is. Not everyone installs these tools globally, and this project may require a different version of e.g. Mocha than other projects installed on your laptop.
@kevinburkeshyp @kevinburke
You seem to be misunderstanding.
In package.json
, since PATH contains ./node_modules/.bin/
, mocha installed in ./node_modules/
will be used.
% cat package.json
{
"devDependencies": {
"mocha": "^4.0.1"
},
"scripts": {
"which-mocha": "which mocha"
}
}
% npm run which-mocha
> @ which-mocha /home/vagrant/work/1205
> which mocha
/home/vagrant/work/1205/node_modules/.bin/mocha
./node_modules/.bin/
in package.json.