I'm looking through this tutorial which might be outdated that mentions a .bowerrc file after running yo angular. But for me, the .bowerrc file is missing. I couldn't find sources say that it's no longer in use. So if I still need it, where can I get it?


Update: The reason I didn't have .bowerrc was because my yo angular did not run to completion due to errors. It has been fixed since.

有帮助吗?

解决方案 2

just create in your root a .bowerrc file with that content

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

All packages will be installed in that directory. Then create a file bower.json with that content

{
  "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"
  }
}

and run it with node prompt bower install

I hope will hepls you

其他提示

I think that setting line mentioned above

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

Isn't necessary; check the Bower configuration page.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top