Reputation: 17203
I am trying to write a batch file that will install node modules from, and in, different directories. My problem is that the script is navigating to the foo directory and executing npm install but then it won't execute the other two do() commands.
do(
cd foo
npm install
)
do(
cd ../bar
npm install
)
do(
cd ../again
bower install
)
EDIT:
I've also tried the following in a .bat file
call Install_Node_Components_Site.bat
call Install_Bower_Components.bat
call Install_Node_Components_Test.bat
The Install_Node_Components_Site.bat file is very basic and looks like this.
cd foo
npm install
The foo directory has the packages.json file so my thinking is that I can just call npm install like I normally would from the command line.
Upvotes: 1
Views: 4744
Reputation: 67216
If npm is a Batch file: npm.bat
, it requires to be executed via call
command this way:
do(
cd foo
call npm install
)
The same point apply for bower
command.
Upvotes: 6