clonn / slack-node-sdk

slack.com, slack, node sdk
MIT License
167 stars 32 forks source link

Fix path of script element of package.json #45

Closed abetomo closed 6 years ago

abetomo commented 6 years ago
kevinburkeshyp commented 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.

abetomo commented 6 years ago

@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