I have a top level package.json file in my project and also one within a sub folder.
index.html
package.json
node_modules/
sub-folder/
sub-folder/package.json
sub-folder/node_modules/
I want to run a single command which will run npm install for both packages. In my top level package.json I have the following:
"scripts": {
"start": "npm install sub-folder",
This does install the dependancies from the package.json in my sub folder, however it installs them in my top level node_modules folder, not the one nested in the sub folder.
Do I need to use custom JavaScript as in the answer below? It seems overkill to do so as im so close: