Files
oak-gpui/styles/src/buildThemes.ts
T
Nate Butlerandgibusu 409b818717 Fix incorrect path in theme build script
`buildThemes.ts` had an incorrect path for generating the theme json files.

It probably happened when we did some reorganization of the styles directory.

Co-Authored-By: gibusu <95764254+gibusu@users.noreply.github.com>
2022-04-12 12:37:38 -04:00

18 lines
540 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`);
}