我运行了“ yo angular”,然后意识到它安装了1.0.8,我卸载了angular组件,但是当我重新添加所有1.2时,原始的bower.json文件在“ devDependencies”下有angular-mocks和angular-scenario。 0-rc.2组件下的依赖项而不是devDependencies下的angular-mocks和angular-scenario。
我对devDependencies的使用方式以及是否应该手动修复它或保留原样感到好奇。有没有一种方法可以在Bower CLI中指定如何将某些内容标记为dev依赖项?
编辑文件后:
{
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"
}
}