mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
93c0c2af0a
Replaced remaining extends with javascript object extension. Moved tokens/core.ts to tokens.ts and massaged the types to make it more obvious when types don't match up. Co-authored-by: Nathan Sobo <nathan@zed.dev>
17 lines
579 B
TypeScript
17 lines
579 B
TypeScript
import * as fs from "fs";
|
|
import * as path from "path";
|
|
import dark from "./themes/dark";
|
|
import light from "./themes/light";
|
|
import app from "./styleTree/app";
|
|
import decamelizeTree from "./utils/decamelizeTree";
|
|
|
|
const themes = [dark, light];
|
|
for (let theme of themes) {
|
|
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}`);
|
|
}
|