Permalink
Browse files

parse devAlias

  • Loading branch information...
1 parent 670cd0c commit ab5a3b09f1ace840e0d8a26bd46935105a580136 Hsiaoming Yang committed Mar 22, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/spm-tree
View
@@ -62,9 +62,14 @@ function tree(f, paths, depth) {
if (pkg.spm && pkg.spm.alias) {
var alias = pkg.spm.alias;
+ var devAlias = pkg.spm.devAlias || {};
var deps = Object.keys(alias).map(function(key) {
- var parsed = spm.sdk.module.parseIdentify(alias[key]);
+ var depfile = alias[key];
+ if (depfile === key) {
+ depfile = devAlias[key] || depfile;
+ }
+ var parsed = spm.sdk.module.parseIdentify(depfile);
if (parsed && parsed.family && parsed.name && parsed.version) {
return parsed;
}

0 comments on commit ab5a3b0

Please sign in to comment.