From 3f828c8649565d22a3af56c9a655f46ac5896d00 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 7 Sep 2023 16:55:39 +1200 Subject: [PATCH] Make Default first option in built themes JSON --- scripts/buildHomebrew.js | 6 +++--- themes/codeMirror/editorThemes.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js index cc624fc5c..701240f31 100644 --- a/scripts/buildHomebrew.js +++ b/scripts/buildHomebrew.js @@ -106,12 +106,12 @@ fs.emptyDirSync('./build'); const editorThemeFile = './themes/codeMirror/editorThemes.json'; if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile); const stream = fs.createWriteStream(editorThemeFile, { flags: 'a' }); - stream.write('[\n'); + stream.write('[\n"default"'); for (themeFile of editorThemeFiles) { - stream.write(`"${themeFile.slice(0, -4)}",\n`); + stream.write(`,\n"${themeFile.slice(0, -4)}"`); } - stream.write('"default"\n]\n'); + stream.write('\n]\n'); stream.end(); await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes'); diff --git a/themes/codeMirror/editorThemes.json b/themes/codeMirror/editorThemes.json index c94cd29cf..a4dd74470 100644 --- a/themes/codeMirror/editorThemes.json +++ b/themes/codeMirror/editorThemes.json @@ -1,4 +1,5 @@ [ +"default", "3024-day", "3024-night", "abbott", @@ -63,6 +64,5 @@ "xq-light", "yeti", "yonce", -"zenburn", -"default" +"zenburn" ]