title: How to change package.json output location
body: <p>Is there a package.json option to specify the relative location of the node_modules directory?</p>
  <p>For my application I have a directory structure that looks like the following.</p>
  <h3>Current Directory Structure</h3>
  <pre><code>root/
  ---/client
  -------/(client code)
  ---/server
  ------/package.json* (sibling of node_modules)
  ------/node_modules*
  ------/server.js
  </code></pre>
  <p>I'd like to add <a href="http://gruntjs.com/" rel="nofollow noreferrer">grunt</a> tasks to the project's root directory (since they'll apply to both the client code and server code). Gruntfile.js needs to be a <a href="http://gruntjs.com/getting-started#the-gruntfile" rel="nofollow noreferrer">sibling of package.json</a>.</p>
  <p>I'd like to move package.json to the root directory for this reason, but I'd also like to keep the node_modules within the server directory. Is there an option within package.json to do this?</p>
  <p>I'd like the resulting directory structure to look like the following.</p>
  <h3>Preferred Directory Structure</h3>
  <pre><code>root/
  ---/package.json* (not a sibling of node_modules)
  ---/Gruntfile.js
  ---/client
  -------/(client code)
  ---/server
  ------/node_modules*
  </code></pre>
  <p>An option like the following would be the most preferred (there does not seem to be an option like this in the <a href="https://www.npmjs.org/doc/json.html" rel="nofollow noreferrer">npm docs</a>)</p>
  <h3>Hypothetical package.json</h3>
  <pre><code>{
     &quot;output_dir&quot;: &quot;server/node_modules&quot;, // Something like this
     &quot;dependencies&quot;: { ... },
     &quot;devDependencies&quot;: { ... }
  }
  </code></pre>