mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-31 06:32:37 +00:00
Make Default first option in built themes JSON
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user