0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-16 12:32:39 +00:00

Make Default first option in built themes JSON

This commit is contained in:
G.Ambatte
2023-09-07 16:55:39 +12:00
parent 343e176b83
commit 3f828c8649
2 changed files with 5 additions and 5 deletions

View File

@@ -106,12 +106,12 @@ fs.emptyDirSync('./build');
const editorThemeFile = './themes/codeMirror/editorThemes.json'; const editorThemeFile = './themes/codeMirror/editorThemes.json';
if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile); if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile);
const stream = fs.createWriteStream(editorThemeFile, { flags: 'a' }); const stream = fs.createWriteStream(editorThemeFile, { flags: 'a' });
stream.write('[\n'); stream.write('[\n"default"');
for (themeFile of editorThemeFiles) { 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(); stream.end();
await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes'); await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes');

View File

@@ -1,4 +1,5 @@
[ [
"default",
"3024-day", "3024-day",
"3024-night", "3024-night",
"abbott", "abbott",
@@ -63,6 +64,5 @@
"xq-light", "xq-light",
"yeti", "yeti",
"yonce", "yonce",
"zenburn", "zenburn"
"default"
] ]