0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +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';
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');

View File

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