diff --git a/public/upmock-client b/public/upmock-client index d2b0772..17f4856 160000 --- a/public/upmock-client +++ b/public/upmock-client @@ -1 +1 @@ -Subproject commit d2b07722fd3b5f8e4ddb9b503d155735bd1a0f3d +Subproject commit 17f48561fa2fdd6268b714d07ac930aa2d137cfa diff --git a/upmock.node.js b/upmock.node.js index 5b76e9f..47a0946 100644 --- a/upmock.node.js +++ b/upmock.node.js @@ -82,7 +82,18 @@ app.get('/fonts/', function(_err, res) { var t2 = _.map(googleFonts.items, function(x) { return {'id': x.family, 'family':x.family, 'source':'google'}; }); - var result = t1.concat(t2); + + var result = t1.concat(t2).sort(function(a, b) { + var nameA = a.family.toLowerCase(); + var nameB = b.family.toLowerCase(); + if (nameA < nameB) { + return -1; + } + if (nameA > nameB) { + return 1; + } + return 0; + }); fs.writeFile(__dirname + '/fonts.json', JSON.stringify(result), function(err) { if (!err) {