2022-04-01 15:45:11 +00:00
|
|
|
import * as fs from "fs";
|
|
|
|
import * as path from "path";
|
2022-04-02 03:58:04 +00:00
|
|
|
import app from "./styleTree/app";
|
2022-04-01 15:45:11 +00:00
|
|
|
import dark from "./themes/dark";
|
|
|
|
import light from "./themes/light";
|
|
|
|
import decamelizeTree from "./utils/decamelizeTree";
|
|
|
|
|
|
|
|
const themes = [dark, light];
|
|
|
|
for (let theme of themes) {
|
2022-04-01 17:45:08 +00:00
|
|
|
let styleTree = decamelizeTree(app(theme));
|
|
|
|
let styleTreeJSON = JSON.stringify(styleTree, null, 2);
|
|
|
|
let outPath = path.resolve(
|
|
|
|
`${__dirname}/../crates/zed/assets/themes/${theme.name}.json`
|
|
|
|
);
|
|
|
|
fs.writeFileSync(outPath, styleTreeJSON);
|
|
|
|
console.log(`Generated ${outPath}`);
|
2022-04-01 15:45:11 +00:00
|
|
|
}
|