为什么 package.json 中的依赖项以 @polymer 为前缀?
Why is dependency in package.json prefixed with @polymer?
在查看 this package.json 时,我看到了 sinonjs 的两个版本:
"dependencies": {
"@polymer/sinonjs": "^1.14.1",
...
"sinon": "^2.3.5",
...
},
sinon
和@polymer/sinonjs
有什么区别?
以@namespace
开头的节点包是scoped packages。通常,这意味着一个组织希望为其所有可能具有已在全局命名空间中采用的通用名称的包制定标准化的命名约定。
在您的示例中,组织是 Polymer who has their own published version of sinon
. As to why Polymer has their own published package of Sinon you'd have to ask them. The description suggests it's a workaround to access the Bower version of Sinon. That workaround probably wont be needed once Polymer makes the jump to NPM。
SinonJS proxy repository for the BowerJS package manager
在查看 this package.json 时,我看到了 sinonjs 的两个版本:
"dependencies": {
"@polymer/sinonjs": "^1.14.1",
...
"sinon": "^2.3.5",
...
},
sinon
和@polymer/sinonjs
有什么区别?
以@namespace
开头的节点包是scoped packages。通常,这意味着一个组织希望为其所有可能具有已在全局命名空间中采用的通用名称的包制定标准化的命名约定。
在您的示例中,组织是 Polymer who has their own published version of sinon
. As to why Polymer has their own published package of Sinon you'd have to ask them. The description suggests it's a workaround to access the Bower version of Sinon. That workaround probably wont be needed once Polymer makes the jump to NPM。
SinonJS proxy repository for the BowerJS package manager