@gtk-js/theme-adwaita 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # @gtk-js/theme-adwaita
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0982123: Bump all packages past burned npm versions
8
+ - Updated dependencies [0982123]
9
+ - @gtk-js/gtk-css@0.1.1
10
+
11
+ ## 0.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - @gtk-js/gtk-css@0.2.0
package/build.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { compileGtkCSS } from "@gtk-js/gtk-css/compile";
2
+ import { mkdirSync } from "fs";
3
+
4
+ const scssPath = new URL("../../upstream/libadwaita/src/stylesheet/default.scss", import.meta.url)
5
+ .pathname;
6
+
7
+ const outDir = new URL("dist/", import.meta.url).pathname;
8
+ mkdirSync(outDir, { recursive: true });
9
+
10
+ const variants = [
11
+ { name: "light", scheme: "light" as const },
12
+ { name: "dark", scheme: "dark" as const },
13
+ { name: "auto", scheme: undefined },
14
+ ] as const;
15
+
16
+ for (const { name, scheme } of variants) {
17
+ const css = await compileGtkCSS(scssPath, scheme ? { scheme } : undefined);
18
+ await Bun.write(`${outDir}${name}.css`, css);
19
+ process.stdout.write(` ${name}: ${css.length}b\n`);
20
+ }
21
+
22
+ console.log(`Built ${variants.length} Adwaita variants.`);