title: Run npm scripts using local deps
body: <p>Currently I run npm scripts using local deps this way:</p>
  
  <p>package.json:</p>
  
  <pre><code>  "scripts": {
      "test": "node ./node_modules/karma/bin/karma start",
      "node-test": "node ./node_modules/jasmine/bin/jasmine",
      "build": "node ./node_modules/gulp/bin/gulp build"
    },
  </code></pre>
  
  <p>I don't want to use global deps, since I can forgot to add deps to the package.json. This way when a local dep is missing, then I got an error message and I don't have problems because some deps are not installed globally, e.g. karma plugins.</p>
  
  <p>Is there a better (shorter) way to define npm scripts using the local libs? Is this travis compatible?</p>
  
  <p>edit:</p>
  
  <p>If it wasn't obvious I have the same libs installed globally, but I want to use the local installs by these projects. That means when I start karma with <code>karma start</code> then the globally installed version will start the karma server, which means that if I don't have all of the karma plugins globally installed, then I got error.</p>
  
  <p>Another problem that I have windows, so the solutions described here: <a href="https://stackoverflow.com/questions/9679932/how-to-use-package-installed-locally-in-node-modules">How to use package installed locally in node_modules?</a> do not work. Windows does not recognize the <code>#!/bin/sh</code> and the <code>#!/usr/bin/env node</code> head sections and there is no sh command as far as I can tell. At least not in webstorm terminal. Git bash has the sh command, but I want to run these npm scripts from webstorm terminal.</p>
  
  <p>One possible solution could be to fix somehow webstorm so it could use sh from terminal. After that I could use <code>$(npm bin)</code> I assume. But that's just a guess. I am not sure whether this can be done.</p>