mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-24 21:38:10 +00:00
basic editor
This commit is contained in:
@@ -63,17 +63,10 @@ export function generateAssetsPlugin(isDev = false) {
|
||||
await fs.copy('./client/icons', `${buildDir}/icons`);
|
||||
|
||||
// Compile CodeMirror editor themes
|
||||
const editorThemesBuildDir = `${buildDir}/homebrew/cm-themes`;
|
||||
await fs.copy('./node_modules/codemirror/theme', editorThemesBuildDir);
|
||||
await fs.copy('./themes/codeMirror/customThemes', editorThemesBuildDir);
|
||||
|
||||
const editorThemeFiles = fs.readdirSync(editorThemesBuildDir);
|
||||
await fs.outputFile(`${buildDir}/homebrew/codeMirror/editorThemes.json`,
|
||||
JSON.stringify(['default', ...editorThemeFiles.map((f)=>f.slice(0, -4))], null, 2),
|
||||
await fs.outputFile(
|
||||
`${buildDir}/homebrew/codeMirror/editorThemes.json`,
|
||||
JSON.stringify(['light', 'dark'], null, 2)
|
||||
);
|
||||
|
||||
// Copy remaining CodeMirror assets
|
||||
await fs.copy('./themes/codeMirror', `${buildDir}/homebrew/codeMirror`);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user