aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2020-03-27 12:17:22 +0100
committerLibravatar vantezzen <hello@vantezzen.io>2020-03-27 12:17:22 +0100
commit9fc997c898f5806fa8a841597966547fd371db90 (patch)
tree6ef2f2478151bdef6d6cb24536391b41e81874f6 /scripts
parentAdd Any.do (diff)
downloadferdium-recipes-9fc997c898f5806fa8a841597966547fd371db90.tar.gz
ferdium-recipes-9fc997c898f5806fa8a841597966547fd371db90.tar.zst
ferdium-recipes-9fc997c898f5806fa8a841597966547fd371db90.zip
Add sorting package list alphabetically
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/package.js b/scripts/package.js
index 90a05a9..a241edc 100644
--- a/scripts/package.js
+++ b/scripts/package.js
@@ -92,6 +92,13 @@ Please make sure it contains: id, name, config`);
92 console.log('No package with ID found - creating new.'); 92 console.log('No package with ID found - creating new.');
93 all.push(packageInfo); 93 all.push(packageInfo);
94 } 94 }
95
96 // Sort package list alphabetically
97 all = all.sort((a, b) => {
98 var textA = a.id.toLowerCase();
99 var textB = b.id.toLowerCase();
100 return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
101 });
95 await fs.writeJson(allJson, all, { 102 await fs.writeJson(allJson, all, {
96 spaces: 2, 103 spaces: 2,
97 EOL: '\n', 104 EOL: '\n',