Skip to content

Commit

Permalink
fix tokens test (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed May 13, 2024
1 parent 75cc0e2 commit cd5435c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
13 changes: 7 additions & 6 deletions libs/@guardian/design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@guardian/design-tokens",
"version": "0.1.0--pre.0",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/__generated__/tokens.js",
"types": "src/__generated__/tokens.d.ts",
"main": "__generated__/tokens.js",
"types": "__generated__/tokens.d.ts",
"files": [
"src/__generated__"
"__generated__"
],
"scripts": {
"build": "co build && prettier --write src/__generated__/**",
"build": "co build && prettier --write __generated__/**",
"fix": "pnpm lint --fix",
"lint": "eslint --cache ."
},
Expand All @@ -27,10 +27,11 @@
"build": {
"inputs": [
"{projectRoot}/tokens.config.js",
"{projectRoot}/tokens.json",
"{projectRoot}/package.json"
],
"outputs": [
"{projectRoot}/src/__generated__"
"{projectRoot}/__generated__"
]
},
"lint": {
Expand Down
4 changes: 2 additions & 2 deletions libs/@guardian/design-tokens/tokens.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const pxToRem = (token) => {

/** @type {import('@cobalt-ui/core').Config} */
export default {
tokens: 'src/tokens.json',
outDir: './src/__generated__',
tokens: 'tokens.json',
outDir: './__generated__',
plugins: [
pluginCSS({
p3: false,
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion libs/@guardian/source-foundations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"inputs": [
"{projectRoot}/src/**",
"{projectRoot}/package.json",
"{projectRoot}/tsconfig.json"
"{projectRoot}/tsconfig.json",
"{workspaceRoot}/libs/@guardian/design-tokens/__generated__/**"
],
"outputs": [
"{projectRoot}/dist"
Expand Down
3 changes: 2 additions & 1 deletion libs/@guardian/source-foundations/src/tokens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ describe('Palette tokens', () => {
'10': '#1A1A1A',
'100': '#FFFFFF',
'20': '#333333',
'38': '#606060',
'38': '#545454',
'46': '#707070',
'60': '#999999',
'7': '#121212',
'73': '#BABABA',
'86': '#DCDCDC',
'93': '#EDEDED',
'97': '#F6F6F6',
Expand Down

0 comments on commit cd5435c

Please sign in to comment.