2

我正在浏览本教程,该教程可能已过时,在运行后提到了 .bowerrc 文件yo angular。但对我来说, .bowerrc 文件丢失了。我找不到消息来源说它不再使用。所以如果我仍然需要它,我在哪里可以得到它?


更新:我没有 .bowerrc 的原因是因为我yo angular没有运行完成由于错误。从那以后它就被修复了

4

2 回答 2

2

我认为上面提到的设置线

  "json": "bower.json" // Add this line

没有必要;检查 Bower配置页面。

于 2014-07-29T18:45:18.640 回答
1

只需在您的根目录中创建一个包含该内容的 .bowerrc 文件

 {
      "directory": "app/components",
      "json": "bower.json" // Add this line
  }

所有软件包都将安装在该目录中。然后使用该内容创建一个文件 bower.json

{
  "name": "project",
  "version": "0.0.0",
  "authors": "",
  "description": "",
  "license": "MIT",
  "dependencies": {
    "jquery": "~2.1.0",
    "angular": "~1.2.13",
    "angular-resource": "~1.2.13",
    "angular-route": "~1.2.13"
  }
}

并使用节点提示符运行它bower install

我希望能帮助你

于 2014-02-17T23:08:12.767 回答