mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
Sort packages before rendering in UI
This commit is contained in:
parent
6b3617754c
commit
4379821787
1 changed files with 9 additions and 0 deletions
|
@ -55,6 +55,15 @@ module.exports = function(config, auth, storage) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, function(packages) {
|
}, function(packages) {
|
||||||
|
packages.sort(function(p1, p2) {
|
||||||
|
if (p1.name < p2.name) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
next(template({
|
next(template({
|
||||||
name: config.web && config.web.title ? config.web.title : 'Sinopia',
|
name: config.web && config.web.title ? config.web.title : 'Sinopia',
|
||||||
packages: packages,
|
packages: packages,
|
||||||
|
|
Loading…
Add table
Reference in a new issue