I'd like to create my own theme, but I want to deeply customize it. Synthwave '84 does that, but in very tricky way. Here is a small piece of it:
const chromeStyles = fs.readFileSync(__dirname +'/css/editor_chrome.css', 'utf-8');
const jsTemplate = fs.readFileSync(__dirname +'/js/theme_template.js', 'utf-8');
const themeWithGlow = jsTemplate.replace(/\[DISABLE_GLOW\]/g, disableGlow);
const themeWithChrome = themeWithGlow.replace(/\[CHROME_STYLES\]/g, chromeStyles);
const finalTheme = themeWithChrome.replace(/\[NEON_BRIGHTNESS\]/g, neonBrightness);
fs.writeFileSync(templateFile, finalTheme, "utf-8");
I could just copy that, but I think it is unreliable (it causes VSCode corrupted error) and maybe there is a more eloquent way to do so.