From 46a6ed4fcc20265985d677051de3260c3235556f Mon Sep 17 00:00:00 2001 From: Sean Robertson Date: Fri, 8 Sep 2023 15:21:51 +1200 Subject: [PATCH] Modify build script to include custom theme dir --- scripts/buildHomebrew.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js index e78759168..e2eae1e6c 100644 --- a/scripts/buildHomebrew.js +++ b/scripts/buildHomebrew.js @@ -101,7 +101,10 @@ fs.emptyDirSync('./build'); //v==---------------------------MOVE CM EDITOR THEMES -----------------------------==v// - editorThemeFiles = fs.readdirSync('./node_modules/codemirror/theme'); + const editorThemesBuildDir = './build/homebrew/cm-themes'; + await fs.copy('./node_modules/codemirror/theme', editorThemesBuildDir); + await fs.copy('./themes/codeMirror/customThemes', editorThemesBuildDir); + editorThemeFiles = fs.readdirSync(editorThemesBuildDir); const editorThemeFile = './themes/codeMirror/editorThemes.json'; if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile); @@ -114,7 +117,7 @@ fs.emptyDirSync('./build'); stream.write('\n]\n'); stream.end(); - await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes'); + await fs.copy('./themes/codeMirror', './build/homebrew/codeMirror'); //v==----------------------------- BUNDLE PACKAGES --------------------------------==v//