【问题标题】:run bower install for target bower.json file为目标 bower.json 文件运行 bower install
【发布时间】:2014-12-03 11:29:37
【问题描述】:

假设在脚本执行期间我的工作目录是c:\foo\。我想从那里为c:\foo\bar\bower.json 文件运行凉亭。这可以通过运行 npm install --prefix c:\foo\bar 在 npm 上获得。

bower 中有没有等价的命令?

【问题讨论】:

  • 这在npm 中真的有效吗?我认为--prefix 是针对目标,而不是清单。
  • @Mathletics 是的,对。就是目录。不是 package.json 文件。更新了问题。
  • 你想把软件包安装在哪里? \foo\bower_components\foo\bar\bower_components?
  • @Mathletics \foo\bar\bower_components

标签: javascript node.js npm bower bower-install


【解决方案1】:

.bowerrc 文件添加到c:\foo\,内容如下:

{
   "cwd": "bar
}

这会将 Bower 的工作目录设置为 c:\foo\bar\

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-19
    • 1970-01-01
    • 2013-12-13
    • 2014-05-18
    • 2015-09-02
    • 1970-01-01
    • 2014-04-09
    相关资源
    最近更新 更多