Skip to content

Commit

Permalink
chore: move builds to lowercase dir names
Browse files Browse the repository at this point in the history
  • Loading branch information
Suya1671 committed Jul 23, 2024
1 parent ebabe35 commit 0898d43
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if (!vscePath) {
* @param name The name of the theme
*/
const buildSingleThemes = async (theme: Theme, type: string) => {
const pathType = type.toLowerCase();
console.log(`Building ${type} themes`);
const [_, ...colorList] = theme.theme.contrastColors;
const backgrounds = objectEntries(theme.backgrounds)
Expand All @@ -45,32 +46,32 @@ const buildSingleThemes = async (theme: Theme, type: string) => {
...colorListToObj(colorList),
};
const lchJson = JSON.stringify(lch, null, 2);
await Deno.writeTextFile(`build/${type}/kleur-lch.json`, lchJson);
await Deno.writeTextFile(`build/${pathType}/kleur-lch.json`, lchJson);

const hex = themeToColors(theme, (color) => color.hex());
const hexJson = JSON.stringify(hex, null, 2);
await Deno.writeTextFile(`build/${type}/kleur-hex.json`, hexJson);
await Deno.writeTextFile(`build/${pathType}/kleur-hex.json`, hexJson);

const base16 = toBase24(theme);
const base16Json = JSON.stringify(base16, null, 2);
const base16Yaml = YAML.stringify(base16);
await Deno.writeTextFile(`build/${type}/kleur.yaml`, base16Yaml);
await Deno.writeTextFile(`build/${type}/kleur.json`, base16Json);
await Deno.writeTextFile(`build/${pathType}/kleur.yaml`, base16Yaml);
await Deno.writeTextFile(`build/${pathType}}/kleur.json`, base16Json);

const windowsTerminal = await toWindowsTerminalTheme(theme);
await Deno.writeTextFile(
`build/${type}/windows-terminal.json`,
`build/${pathType}}/windows-terminal.json`,
windowsTerminal,
);

const helix = await toHelixTheme(theme);
await Deno.writeTextFile(`build/${type}/helix.toml`, helix);
await Deno.writeTextFile(`build/${pathType}/helix.toml`, helix);

const gtk = await toGtkTheme(theme);
await Deno.writeTextFile(`build/${type}/gtk.css`, gtk);
await Deno.writeTextFile(`build/${pathType}/gtk.css`, gtk);

const css = toCss(theme);
await Deno.writeTextFile(`build/${type}/kleur.css`, css);
await Deno.writeTextFile(`build/${pathType}/kleur.css`, css);

console.log(`Built ${type} themes`);
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
dark = {
base16-nix = dark-theme;
base16 = dark-theme-base16;
build = ./build/Dark;
build = ./build/dark;
};
light = {
base16-nix = light-theme;
base16 = light-theme-base16;
build = ./build/Light;
build = ./build/light;
};
zed = ./build/zed.json;
vscode = ./build/vscode/kleur-code-0.3.0.vsix;
Expand Down

0 comments on commit 0898d43

Please sign in to comment.