slushjs / gulp-install

Automatically install npm and bower packages if package.json or bower.json is found in the gulp file stream respectively
MIT License
106 stars 46 forks source link

Check for binary in ./node_modules/.bin/ first #50

Open theredcat opened 7 years ago

theredcat commented 7 years ago

When you want to have a clean package, you must put dev tool list and version in devDependencies in your package.json, for example :

  "devDependencies": {
    "gulp": "^3.8.8",
    "bower": "^1.8.0"
  }

However, node-which which is used to check if the binary is present doesn't check in this folder since ./node_modules/.bin/ is unlikely to be in your path.

A workaround is to run with a prefixed export like this :

PATH=$PATH:./node_modules/.bin/ ./node_modules/.bin/gulp

But I think it would be a better solution to check in .node_modules/.bin/

theredcat commented 7 years ago

https://github.com/slushjs/gulp-install/pull/51