我正在Visual Studio 2015中处理Angular2(目前在RC1上)项目;并使我对NPM的理解变得紧张。
查看Dependencies / npm文件夹和/ node_modules,有数百个的npm包。其中大多数被Visual Studio标记为extraneous
(在Dependencies / npm中)
我经过并手动删除了所有无关的包(npm prune什么都没做)。
我显然意外地删除了一个非外来的包,我试图恢复它。 NPM继续并再次重新下载了所有500多个无关的包......
我错过了什么?
我的package.json:
{
"name": "MySite",
"version": "0.0.1",
"description": "My Site",
"repository": "./src",
"license": "UNLICENSED",
"dependencies": {
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/router": "^2.0.0-rc.1",
"es6-promise": "3.1.2",
"es6-shim": "0.35.0",
"jquery": "2.2.2",
"jquery-validation": "1.15.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
"gulp": "3.9.1",
"gulp-cssmin": "0.1.7",
"gulp-concat": "2.6.0",
"gulp-sass": "2.3.1",
"typings": "0.8.1",
"typescript": "^1.8.10",
"null-loader": "^0.1.1",
"raw-loader": "^0.5.1",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.1",
"webpack": "1.13.0",
"webpack-dev-server": "1.14.1",
"webpack-merge": "0.12.0"
},
"scripts": {
"postinstall": "typings install"
}
}