Is there a package.json option to specify the relative location of the node_modules directory?
For my application I have a directory structure that looks like the following.
Current Directory Structure
root/
---/client
-------/(client code)
---/server
------/package.json* (sibling of node_modules)
------/node_modules*
------/server.js
I'd like to add grunt 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 sibling of package.json.
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?
I'd like the resulting directory structure to look like the following.
Preferred Directory Structure
root/
---/package.json* (not a sibling of node_modules)
---/Gruntfile.js
---/client
-------/(client code)
---/server
------/node_modules*
An option like the following would be the most preferred (there does not seem to be an option like this in the npm docs)
Hypothetical package.json
{
"output_dir": "server/node_modules", // Something like this
"dependencies": { ... },
"devDependencies": { ... }
}