最佳答案
我运行了“ yo angle”,然后意识到它安装了1.0.8,我卸载了 angle 组件,然而,当我重新添加所有1.2.0-rc.2组件时,Bower.json 文件在“ devDependency”下有 angle-moks 和 angle-Scenation,而不是在 devDependency 下。
我很好奇 devDependency 是如何使用的,以及我是否应该费心手动修复它或保持原样。有没有一种方法可以在 bower CLI 上指定如何将某些内容标记为开发依赖项?
编辑后的文件:
{
name: "Angular",
version: "0.0.0",
dependencies: {
json3: "~3.2.4",
jquery: "~1.9.1",
bootstrap-sass: "~2.3.1",
es5-shim: "~2.0.8",
angular-mocks: "1.2.0-rc.2",
angular-sanitize: "1.2.0-rc.2",
angular-resource: "1.2.0-rc.2",
angular-cookies: "1.2.0-rc.2",
angular: "1.2.0-rc.2",
angular-scenario: "1.2.0-rc.2"
},
devDependencies: { }
}
编辑前:
{
"name": "Angular",
"version": "0.0.0",
"dependencies": {
"angular": "~1.0.7",
"json3": "~3.2.4",
"jquery": "~1.9.1",
"bootstrap-sass": "~2.3.1",
"es5-shim": "~2.0.8",
"angular-resource": "~1.0.7",
"angular-cookies": "~1.0.7",
"angular-sanitize": "~1.0.7"
},
"devDependencies": {
"angular-mocks": "~1.0.7",
"angular-scenario": "~1.0.7"
}
}