|
2 | 2 | import { writeFileSync, mkdirSync } from "node:fs"; |
3 | 3 | import { light as rolesLight, dark as rolesDark } from "./palette"; |
4 | 4 | import { makeTheme } from "./theme"; |
| 5 | +import { makeZedThemeFamily } from "./zed-theme"; |
5 | 6 | import { convertRolesToP3 } from "./color-p3"; |
6 | 7 |
|
7 | 8 | mkdirSync("themes", { recursive: true }); |
| 9 | +mkdirSync("zed/themes", { recursive: true }); |
8 | 10 |
|
9 | 11 | // Convert palettes to Display P3 color space |
10 | 12 | const rolesLightP3 = convertRolesToP3(rolesLight); |
11 | 13 | const rolesDarkP3 = convertRolesToP3(rolesDark); |
12 | 14 |
|
13 | | -const out = [ |
| 15 | +// ============================================ |
| 16 | +// VS Code Themes |
| 17 | +// ============================================ |
| 18 | +const vscodeThemes = [ |
14 | 19 | { file: "themes/pierre-light.json", theme: makeTheme("Pierre Light", "light", rolesLight) }, |
15 | 20 | { file: "themes/pierre-dark.json", theme: makeTheme("Pierre Dark", "dark", rolesDark) }, |
16 | 21 | { file: "themes/pierre-light-vibrant.json", theme: makeTheme("Pierre Light Vibrant", "light", rolesLightP3) }, |
17 | 22 | { file: "themes/pierre-dark-vibrant.json", theme: makeTheme("Pierre Dark Vibrant", "dark", rolesDarkP3) } |
18 | 23 | ]; |
19 | 24 |
|
20 | | -for (const {file, theme} of out) { |
| 25 | +for (const {file, theme} of vscodeThemes) { |
21 | 26 | writeFileSync(file, JSON.stringify(theme, null, 2), "utf8"); |
22 | 27 | console.log("Wrote", file); |
23 | 28 | } |
| 29 | + |
| 30 | +// ============================================ |
| 31 | +// Zed Theme Family |
| 32 | +// ============================================ |
| 33 | +const zedTheme = makeZedThemeFamily("Pierre", "pierrecomputer", [ |
| 34 | + { name: "Pierre Light", appearance: "light", roles: rolesLight }, |
| 35 | + { name: "Pierre Dark", appearance: "dark", roles: rolesDark }, |
| 36 | +]); |
| 37 | + |
| 38 | +writeFileSync("zed/themes/pierre.json", JSON.stringify(zedTheme, null, 2), "utf8"); |
| 39 | +console.log("Wrote zed/themes/pierre.json"); |
0 commit comments