Skip to content

Commit 5b10c62

Browse files
committed
feat: replace $themes with $config
removes unused $metadata
1 parent 2349563 commit 5b10c62

File tree

4 files changed

+97
-2439
lines changed

4 files changed

+97
-2439
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { dirname, resolve } from "path";
2+
import { fileURLToPath } from "url";
3+
4+
import { CalciteTokenTransformConfig } from "../support/types/config.js";
5+
import { Platform } from "../support/types/platform.js";
6+
import { globalTokens, coreTokens } from "./index.js";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
11+
export const config: CalciteTokenTransformConfig = {
12+
files: [coreTokens, globalTokens],
13+
options: {
14+
prefix: "calcite",
15+
},
16+
output: {
17+
dir: resolve(__dirname, "../dist"),
18+
platforms: [Platform.SCSS, Platform.CSS, Platform.JS, Platform.ES6],
19+
expandFiles: {
20+
css: {
21+
typography: "classes.css",
22+
colorScheme: { light: "light.css", dark: "dark.css" },
23+
breakpoint: "breakpoint.css",
24+
index: {
25+
name: "index.css",
26+
import: [
27+
"./global.css",
28+
"./classes.css",
29+
["./dark.css", "(prefers-color-scheme: dark)"],
30+
["./light.css", "(prefers-color-scheme: light)"],
31+
],
32+
class: [
33+
["calcite-color-scheme-light", "light"],
34+
["calcite-color-scheme-dark", "dark"],
35+
],
36+
},
37+
},
38+
scss: {
39+
typography: "mixins.scss",
40+
colorScheme: { light: "light.scss", dark: "dark.scss" },
41+
breakpoint: "breakpoints.scss",
42+
index: {
43+
name: "index.scss",
44+
import: ["../css/index.css"],
45+
forward: ["./mixins.scss"],
46+
mixin: [
47+
["calcite-color-scheme-light", "light"],
48+
["calcite-color-scheme-dark", "dark"],
49+
],
50+
},
51+
},
52+
js: {
53+
breakpoint: "breakpoints.js",
54+
index: {
55+
name: "index.js",
56+
export: ["./global.js", "./breakpoints.js"],
57+
},
58+
},
59+
},
60+
},
61+
};
62+
63+
export default config;

packages/calcite-design-tokens/src/$metadata.json

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)