I want to run npm install in my folder and subfolder without having to run:
- npm install
- cd subfolder
- npm install
So, in this script I would run two npm install
in one single command in my main folder without having to cd
into the subfolder.
I know theres how to do it by placing a script on package.json but I forgot the script now.
CodePudding user response:
Problem solved, I could run all of the three commands using &&:
"scripts": {
"yourscript": "npm install && cd subfolder && npm install"
}
CodePudding user response:
You can set a variable name like this
scripts: {
{
"cmdthatyouwant": "nmp i; cd folder; npm i"
}
}