使用batch file安装多个节点模块

我正在尝试编写一个batch file,它将从不同目录中安装节点模块。 我的问题是脚本导航到foo目录并执行npm install,但是它不会执行其他两个do()命令。

do( cd foo npm install ) do( cd ../bar npm install ) do( cd ../again bower install ) 

编辑:

我也尝试了.bat文件中的以下内容

 call Install_Node_Components_Site.bat call Install_Bower_Components.bat call Install_Node_Components_Test.bat 

Install_Node_Components_Site.bat文件是非常基本的,看起来像这样。

 cd foo npm install 

foo目录有packages.json文件,所以我的想法是,我可以像通常从命令行那样调用npm install。

如果npm是batch file: npm.bat ,则需要通过call命令执行:

 do( cd foo call npm install ) 

同样的一点适用于bower指挥。