From 5a6d2c46e95cb0054c0b47afb6cb69b2465cebbb Mon Sep 17 00:00:00 2001 From: codecalm Date: Wed, 25 Mar 2020 18:26:56 +0100 Subject: iconfont sort fix --- gulpfile.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index 0461d49..fa37ce3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -257,6 +257,11 @@ gulp.task('iconfont', function () { //glyphs json let glyphsObject = {}; + //sort glypht + glyphs = glyphs.sort(function(a, b){ + return ('' + a.name).localeCompare(b.name) + }); + glyphs.forEach(function (glyph) { glyphsObject[glyph.name] = glyph.unicode[0].codePointAt(0).toString(16); }); -- cgit v1.2.1