我关注bower.json
{
"name": "name of app",
"version": "0.0.0",
"homepage": "",
"license": "MIT",
"directory": "public/bower_components",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
],
"dependencies": {
"less": "~1.6.1",
"bootstrap": "~3.0.3",
"angular": "~1.2.8",
"angular-animate": "~1.2.8",
"angular-route": "~1.2.8"
}
}
但是当我运行bower install
时,它不会在公共目录下创建bower_components
,并且它不会安装依赖项。以下是bower install
命令的屏幕截图。
如何解决此问题?
答案 0 :(得分:0)
来自文档
A custom install location can be set in a .bowerrc file using the directory property. The .bowerrc file should be a sibling of your project's bower.json.
需要在.bowerrc文件中设置自定义目录路径,而不是bower.json
答案 1 :(得分:0)
这一行你有一个额外的逗号:
"bower_components",
删除逗号,它应该有效。