Skip to content

Commit

Permalink
refactor: transform-groups
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Kuppens Groot <[email protected]>
  • Loading branch information
tkgroot committed Jan 31, 2025
1 parent 33d9cf8 commit 0e3396d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
2 changes: 2 additions & 0 deletions src/transform-group/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { infimaTransformGroup } from "./infima.js";
export { javascriptTransformGroup } from "./javascript.js";
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import StyleDictionary from "style-dictionary";
import "../../name-variable-default/register.js";
import "../../color-rgba/register.js";

/** defines all transformers which will be applied to the web in a consistent way */
StyleDictionary.registerTransformGroup({
export const infimaTransformGroup = {
name: "infima",
transforms: [
"attribute/cti",
"attribute/color",
"name/cti/kebab",
"name/kebab",
"size/px",
"color/css",
// custom transformers
"name/variable/default",
"ts/color/rgba",
],
});
};
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import StyleDictionary from "style-dictionary";
import "../../color-rgba/register.js";
import "../../name-variable-color/register.js";

/** defines all transformers which will be applied to the web in a consistent way */
StyleDictionary.registerTransformGroup({
export const javascriptTransformGroup = {
name: "custom/js",
transforms: [
"attribute/cti",
"attribute/color",
"name/cti/pascal",
"name/pascal",
"size/rem",
"color/hex",
// custom transformers
"name/variable/color",
"ts/color/rgba",
],
});
};

0 comments on commit 0e3396d

Please sign in to comment.