Skip to content

Commit

Permalink
feat: replace $themes with $config
Browse files Browse the repository at this point in the history
removes unused $metadata
  • Loading branch information
alisonailea committed Nov 16, 2023
1 parent 2349563 commit 5b10c62
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 2,439 deletions.
63 changes: 63 additions & 0 deletions packages/calcite-design-tokens/src/$config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { dirname, resolve } from "path";
import { fileURLToPath } from "url";

import { CalciteTokenTransformConfig } from "../support/types/config.js";
import { Platform } from "../support/types/platform.js";
import { globalTokens, coreTokens } from "./index.js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export const config: CalciteTokenTransformConfig = {
files: [coreTokens, globalTokens],
options: {
prefix: "calcite",
},
output: {
dir: resolve(__dirname, "../dist"),
platforms: [Platform.SCSS, Platform.CSS, Platform.JS, Platform.ES6],
expandFiles: {
css: {
typography: "classes.css",
colorScheme: { light: "light.css", dark: "dark.css" },
breakpoint: "breakpoint.css",
index: {
name: "index.css",
import: [
"./global.css",
"./classes.css",
["./dark.css", "(prefers-color-scheme: dark)"],
["./light.css", "(prefers-color-scheme: light)"],
],
class: [
["calcite-color-scheme-light", "light"],
["calcite-color-scheme-dark", "dark"],
],
},
},
scss: {
typography: "mixins.scss",
colorScheme: { light: "light.scss", dark: "dark.scss" },
breakpoint: "breakpoints.scss",
index: {
name: "index.scss",
import: ["../css/index.css"],
forward: ["./mixins.scss"],
mixin: [
["calcite-color-scheme-light", "light"],
["calcite-color-scheme-dark", "dark"],
],
},
},
js: {
breakpoint: "breakpoints.js",
index: {
name: "index.js",
export: ["./global.js", "./breakpoints.js"],
},
},
},
},
};

export default config;
76 changes: 0 additions & 76 deletions packages/calcite-design-tokens/src/$metadata.json

This file was deleted.

Loading

0 comments on commit 5b10c62

Please sign in to comment.