Curious about the meaning of peerDependencies
, I examined the contents of this package.json
file. It relates to a library project that is distributed elsewhere.
{
"name": "...",
"version": "...",
"description": "...",
"author": "...",
"license": "Unlicense",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "typings install && tsc --outDir dist/"
},
"peerDependencies": {
"@angular/core": "^2.0.0", <<<<<<<<
"@angular/http": "^2.0.0", <<<<<<<<
"@angular/common": "^2.0.0", <<<<<<<<
"@angular/compiler": "^2.0.0", <<<<<<<<
"core-js": "^2.4.0", <<<<<<<<
"reflect-metadata": "^0.1.3", <<<<<<<<
"rxjs": "5.0.0-beta.12", <<<<<<<<
"zone.js": "^0.6.17" <<<<<<<<
},
"devDependencies": {
"@angular/core": "^2.0.0", <<<<<<<<
"@angular/http": "^2.0.0", <<<<<<<<
"@angular/common": "^2.0.0", <<<<<<<<
"@angular/compiler": "^2.0.0",
"@angular/platform-browser": "^2.0.0", <<<<<<<<
"core-js": "^2.4.0", <<<<<<<<
"reflect-metadata": "^0.1.3", <<<<<<<<
"rxjs": "5.0.0-beta.12", <<<<<<<<
"zone.js": "^0.6.17", <<<<<<<<
"typescript": "^2.0.0",
"typings": "^1.3.2"
}
}
- Why is the same package listed in both
devDependencies
andpeerDependencies
? - Why isn't
dependencies
used here?