From d85852b66c05ebbc66f9dcdee1e9f5bb55c24cd3 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 18 Aug 2014 09:11:18 +0100 Subject: [PATCH] Sort dependency lists by name --- html/js/melpa.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/js/melpa.js b/html/js/melpa.js index 9c7dc862..cec731f7 100644 --- a/html/js/melpa.js +++ b/html/js/melpa.js @@ -272,7 +272,7 @@ if (!p) return; this.package(p); this.downloadsPercentile(packageList.downloadsPercentileForPackage(p)); - this.neededBy(packageList.dependenciesOnPackageName(this.packageName)); + this.neededBy(_.sortBy(packageList.dependenciesOnPackageName(this.packageName), 'name')); this.packageWithName = packageList.packageWithName; m.request({method: "GET", url: p.readmeURL, @@ -320,7 +320,7 @@ pkg.sourceURL ? m("a", {href: pkg.sourceURL}, pkg.source) : m("span", pkg.source) ]), m("dt", "Dependencies"), - m("dd", intersperse(pkg.dependencies.map(this.depLink), " / ")), + m("dd", intersperse(_.sortBy(pkg.dependencies, 'name').map(this.depLink), " / ")), m("dt", "Needed by"), m("dd", intersperse(ctrl.neededBy().map(this.reverseDepLink), " / ")), pkg.oldNames.length > 0 ? [