ZIm/styles/src/buildThemes.ts
Max Brunsfeld c065f283aa Move assets to their own crate, load keymaps in vim tests
Also, move assets folder to the top-level.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 15:54:52 -07:00

17 lines
537 B
TypeScript

import * as fs from "fs";
import * as path from "path";
import app from "./styleTree/app";
import dark from "./themes/dark";
import light from "./themes/light";
import snakeCase from "./utils/snakeCase";
const themes = [dark, light];
for (let theme of themes) {
let styleTree = snakeCase(app(theme));
let styleTreeJSON = JSON.stringify(styleTree, null, 2);
let outPath = path.resolve(
`${__dirname}/../assets/themes/${theme.name}.json`
);
fs.writeFileSync(outPath, styleTreeJSON);
console.log(`- ${outPath} created`);
}