@gyldendal/kobber-base
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -6,2 +6,3 @@ import fs from "fs"; | ||
import { jsonFormat } from "./src/styleDictionary/formats/json"; | ||
import { tsDeclarationsFormat } from "./src/styleDictionary/formats/tsDeclarations"; | ||
import { getStyleDictionaryConfig } from "./src/styleDictionary/getStyleDictionaryConfig"; | ||
@@ -36,2 +37,4 @@ import { sanitizeJsonFromFigma } from "./src/styleDictionary/sanitizeJsonFromFigma"; | ||
StyleDictionary.registerFormat(tsDeclarationsFormat); | ||
// Convert Figma modes into themes | ||
@@ -38,0 +41,0 @@ |
# @gyldendal/kobber-base | ||
## 0.3.0 | ||
### Minor Changes | ||
- TypeScript token definitions | ||
## 0.2.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@gyldendal/kobber-base", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
"type": "commonjs", | ||
"type": "module", | ||
"scripts": { | ||
"clean": "rm -rf .turbo node_modules", | ||
"build": "yarn ts-node ./buildTokens.ts && ts-node buildTypography.ts" | ||
"build": "tsx ./buildTokens.ts && tsx ./buildTypography.ts", | ||
"yalc": "yalc publish" | ||
}, | ||
@@ -13,3 +14,3 @@ "dependencies": {}, | ||
"type": "git", | ||
"url": "https://github.com/GyldendalDigital/gu-ds" | ||
"url": "https://github.com/GyldendalDigital/kobber" | ||
}, | ||
@@ -19,5 +20,5 @@ "devDependencies": { | ||
"style-dictionary": "^3.9.0", | ||
"ts-node": "^10.9.1", | ||
"tsx": "^4.6.2", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
@@ -1,11 +0,27 @@ | ||
import StyleDictionary, { | ||
Config, | ||
TransformedToken, | ||
transformGroup, | ||
} from "style-dictionary"; | ||
import StyleDictionary, { Config, TransformedToken } from "style-dictionary"; | ||
import { esmFormat } from "./formats/esm"; | ||
import { jsonFormat } from "./formats/json"; | ||
import { tsDeclarationsFormat } from "./formats/tsDeclarations"; | ||
import { fluidClampTransform } from "./transforms/fluidClamp"; | ||
import { pxToRemTransform } from "./transforms/pxToRem"; | ||
const cssTransforms = [ | ||
"attribute/cti", | ||
"name/cti/kebab", | ||
"time/seconds", | ||
"content/icon", | ||
"size/rem", | ||
"color/css", | ||
fluidClampTransform.name, | ||
pxToRemTransform.name, | ||
]; | ||
const jsTransforms = [ | ||
"attribute/cti", | ||
"name/cti/pascal", | ||
"size/rem", | ||
"color/hex", | ||
fluidClampTransform.name, | ||
]; | ||
StyleDictionary.registerTransform(pxToRemTransform); | ||
@@ -30,7 +46,3 @@ | ||
scss: { | ||
transforms: [ | ||
...transformGroup.scss, | ||
fluidClampTransform.name, | ||
...transforms, | ||
], | ||
transforms: [...cssTransforms, ...transforms], | ||
buildPath, | ||
@@ -46,8 +58,3 @@ files: [ | ||
css: { | ||
transforms: [ | ||
...transformGroup.css, | ||
fluidClampTransform.name, | ||
pxToRemTransform.name, | ||
...transforms, | ||
], | ||
transforms: [...cssTransforms, ...transforms], | ||
buildPath, | ||
@@ -67,8 +74,4 @@ prefix: "kobber", | ||
}, | ||
json: { | ||
transforms: [ | ||
...transformGroup.js, | ||
fluidClampTransform.name, | ||
...transforms, | ||
], | ||
object: { | ||
transforms: [...jsTransforms, ...transforms], | ||
buildPath, | ||
@@ -81,12 +84,2 @@ files: [ | ||
}, | ||
], | ||
}, | ||
js: { | ||
transforms: [ | ||
...transformGroup.js, | ||
fluidClampTransform.name, | ||
...transforms, | ||
], | ||
buildPath, | ||
files: [ | ||
{ | ||
@@ -98,4 +91,4 @@ destination: `${themeName}/tokens.js`, | ||
{ | ||
destination: `${themeName}/tokens.ts`, | ||
format: esmFormat.name, | ||
destination: `${themeName}/tokens.d.ts`, | ||
format: tsDeclarationsFormat.name, | ||
filter, | ||
@@ -102,0 +95,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
116975
22
4538
1