Skip to content

Commit

Permalink
chore: Removed warning in tokens' package build (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 authored Nov 21, 2023
1 parent 02e7ed8 commit ee14db8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/tokens/src/style-dictionary/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const fontsConfig: Config = {
"source": ["src/tokens/asset/*.tokens.json"],
"platforms": {
"css-font-face": {
"transforms": ["attribute/font"],
"transforms": ["name/cti/kebab", "attribute/font"],
"buildPath": `${BUILD_PATH}`,
"files": [
{
Expand Down Expand Up @@ -101,7 +101,6 @@ export function getStyleDictionaryConfig(mode: "light" | "dark"): Config {
const darkConfig: File = {
"destination": "dark/tokens.css",
"format": "css/dark-mode",
"filter": "mode/dark",
"options": {
"outputReferences": true
}
Expand Down
5 changes: 2 additions & 3 deletions packages/tokens/src/style-dictionary/format/css-dark-mode.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { Dictionary } from "style-dictionary";
import { isDarkTokens } from "../filter/isDarkTokens.ts";

export const cssDarkMode = function ({ dictionary }: { dictionary: Dictionary }) {
const darkTokens = dictionary.allTokens.filter(token => {
return token.filePath.includes("dark");
}).map(token => {
const darkTokens = dictionary.allTokens.filter(isDarkTokens).map(token => {
let value = token.value;

if (dictionary.usesReference(token.original.value)) {
Expand Down

0 comments on commit ee14db8

Please sign in to comment.