我刚刚在 grunt-contrib-clean package.json 文件中发现,它对 grunt 有依赖性,这在两个部分中都有说明:devDependencies
和 peerDependencies
,
https://github.com/gruntjs/grunt-contrib-clean/blob/master/package.json#L25-L34 :
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-internal": "^0.4.10",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-nodeunit": "^0.4.1"
},
"peerDependencies": {
"grunt": ">=0.4.0"
},
这有意义吗?特别是,有不同的版本说明?这是一个未被注意到的错误吗?
编辑:还发布了一个 github issue .
最佳答案
所以根据; https://github.com/gruntjs/grunt-contrib-clean/issues/67 :
Read up on the difference of devDependencies and peerDependencies. The devDep >is for the actual grunt dep we use for testing and the peerDep is for noting >which grunt version the plugin works with. Both resolve to the same version.
关于javascript - 在 "devDependencies"和 "peerDependencies"中指定 node.js 依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29067071/