Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gyldendal/kobber-base

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gyldendal/kobber-base - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

src/styleDictionary/formats/tsDeclarations.ts

3

buildTokens.ts

@@ -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 @@

11

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc