我从Angular 2开始。我还没有真正熟悉package.json。
我在进口方面遇到了一些问题。当我开始在文件中进行评论时,我看到我有@angular,但我的依赖项中也有angular2。
这个package.json是否格式良好?
{
"name": "Sample",
"version": "0.0.1",
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"angular2": "2.0.0-beta.17", <--- Is this right?
"bootstrap": "3.3.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"jquery": "2.1.4",
"ng2-modal": "0.0.17",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"systemjs": "0.19.6",
"zone.js": "0.5.10"
},
"devDependencies": {
"gulp": "3.8.11",
"gulp-concat": "2.5.2",
"gulp-cssmin": "0.1.7",
"gulp-uglify": "1.2.0",
"gulp-rename": "1.2.2",
"rimraf": "2.2.8",
"lodash": "3.10.1"
},
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"-vs-binding": {
"Clean": [
"tsc"
]
}
}
答案 0 :(得分:2)