mirror of
https://github.com/correl/melpa.git
synced 2024-12-18 19:21:32 +00:00
Show old names on package page, and include download counts for old names
This commit is contained in:
parent
0d58202908
commit
9e5a1ef619
2 changed files with 6 additions and 2 deletions
|
@ -54,17 +54,19 @@
|
|||
var v1 = _.keys(val)[0];
|
||||
return {name: name, version: [v1].concat(val[v1] || []).join('.')};
|
||||
});
|
||||
var oldNames = recipe['old-names'] || [];
|
||||
pkgs[name] = {
|
||||
name: name,
|
||||
version: version,
|
||||
dependencies: deps,
|
||||
description: descr,
|
||||
source: recipe.fetcher,
|
||||
downloads: info.downloads.data[name] || 0,
|
||||
downloads: _.reduce(oldNames.concat(name), function(sum, n) { return sum + (info.downloads.data[n] || 0); }, 0),
|
||||
fetcher: recipe.fetcher,
|
||||
recipeURL: "https://github.com/milkypostman/melpa/blob/master/recipes/" + name,
|
||||
packageURL: "packages/" + name + "-" + version + "." + (built[3] == "single" ? "el" : "tar"),
|
||||
sourceURL: calculateSourceURL(name, recipe)
|
||||
sourceURL: calculateSourceURL(name, recipe),
|
||||
oldNames: oldNames
|
||||
};
|
||||
return pkgs;
|
||||
}, {});
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
<span class="muted" ng-if="!$last">/</span></span>
|
||||
<span class="muted" ng-show="reverseDependencies.length == 0">-</span>
|
||||
</dd>
|
||||
<dt>Renamed from:<dt>
|
||||
<dd><span ng-repeat="oldName in pkg.oldNames"><span class="muted" ng-if="!$first">,</span> {{oldName}}</span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
|
|
Loading…
Reference in a new issue