Skip to content

Commit

Permalink
ensure jspm: not included in package.json (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Feb 2, 2015
1 parent 7550f89 commit a9e310a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/config/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,17 @@ PackageJSON.prototype.write = function() {
var dep = this.dependencies[d];
if (!dep)
continue;
var regName;
// github:some/thing: x.y.z
if (d == dep.name)
depValue = dep.version;
// name is exactly as in registry
// jquery: github:components/jquery@^x.y.z -> jquery: ^x.y.z
else if (registryCache[d + '@' + dep.version] == dep.exactName || registryCache[d] == dep.name)
if (dep.endpoint == 'jspm') {
if (d == dep.package)
depValue = dep.version;
else
depValue = dep.exactPackage;
}
// name is exactly as in registry
else if (registryCache[d] == dep.name)
depValue = dep.version;
else
depValue = this.dependencies[d].exactName;
depValue = dep.exactName;

pjson.dependencies[d] = depValue;
}
Expand Down

0 comments on commit a9e310a

Please sign in to comment.