@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 +15 -0
- package/build.ts +22 -0
- package/dist/auto.css +7357 -0
- package/dist/dark.css +7186 -0
- package/dist/light.css +7130 -0
- package/package.json +18 -0
- package/src/index.ts +48 -0
package/CHANGELOG.md
ADDED
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.`);
|