Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test_design_tokens_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
run: npm install
working-directory: ./packages/design-tokens

- name: Prettier format check
run: npm run format:check
working-directory: ./packages/design-tokens

- name: Run test suite with npm script
run: npm run test
working-directory: ./packages/design-tokens
22 changes: 10 additions & 12 deletions packages/design-tokens/build-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,13 @@ const sd = new StyleDictionary({
{
destination: "variables.scss",
format: "scss/map-deep",
filter: (t) => (
filter: (t) =>
/* strip metadata */
!(['$themes', '$metadata'].includes(t))
),
!["$themes", "$metadata"].includes(t),
options: {
"mapName": "bcds",
"themeable": false
}
mapName: "bcds",
themeable: false,
},
},
],
},
Expand All @@ -264,14 +263,13 @@ const sd = new StyleDictionary({
{
destination: "variables.scss",
format: "scss/map-deep",
filter: (t) => (
filter: (t) =>
/* strip metadata */
!(['$themes', '$metadata'].includes(t))
),
!["$themes", "$metadata"].includes(t),
options: {
"mapName": "bcds",
"themeable": false
}
mapName: "bcds",
themeable: false,
},
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions packages/design-tokens/build-output.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test("build-output.js should complete without errors", async () => {
}
console.log("build-output.js executed successfully:", stdout);
resolve();
},
}
);
});
assert.ok(true);
Expand Down Expand Up @@ -107,7 +107,7 @@ test("theme.blue.100 should be present in all output files", async () => {
const fileContent = readFileSync(filePath, "utf-8");
assert.ok(
fileContent.includes(token),
`Expected token "${token}" to be present in file ${file}`,
`Expected token "${token}" to be present in file ${file}`
);
}
});
260 changes: 139 additions & 121 deletions packages/design-tokens/build/css-prefixed/variables.css

Large diffs are not rendered by default.

260 changes: 139 additions & 121 deletions packages/design-tokens/build/css/variables.css

Large diffs are not rendered by default.

777 changes: 397 additions & 380 deletions packages/design-tokens/build/scss-prefixed/variables.scss

Large diffs are not rendered by default.

777 changes: 397 additions & 380 deletions packages/design-tokens/build/scss/variables.scss

Large diffs are not rendered by default.

260 changes: 139 additions & 121 deletions packages/design-tokens/dist/css-prefixed/variables.css

Large diffs are not rendered by default.

260 changes: 139 additions & 121 deletions packages/design-tokens/dist/css/variables.css

Large diffs are not rendered by default.

777 changes: 397 additions & 380 deletions packages/design-tokens/dist/scss-prefixed/variables.scss

Large diffs are not rendered by default.

777 changes: 397 additions & 380 deletions packages/design-tokens/dist/scss/variables.scss

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions packages/design-tokens/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion packages/design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"build": "./run-build.sh",
"prepare-npm-package": "./run-prepare-npm-package.sh",
"publish-npm-package": "./run-publish-npm-package.sh",
"test": "node --test build-output.test.js"
"test": "node --test build-output.test.js",
"format:check": "npx prettier . --check",
"format": "npx prettier . --write"
},
"type": "module",
"keywords": [
Expand All @@ -30,5 +32,8 @@
"dependencies": {
"@tokens-studio/sd-transforms": "2.0.3",
"style-dictionary": "5.2.0"
},
"devDependencies": {
"prettier": "3.8.4"
}
}
21 changes: 21 additions & 0 deletions packages/design-tokens/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// prettier.config.js

/**
* @see https://prettier.io/docs/configuration
* @type {import("prettier").Config}
*/
const config = {
// https://prettier.io/docs/options#trailing-commas
trailingComma: "es5",

// https://prettier.io/docs/options#tab-width
tabWidth: 2,

// https://prettier.io/docs/options#semicolons
semi: true,

// https://prettier.io/docs/options#quotes
singleQuote: false,
};

export default config;
Loading