🧑💻(tokens) add getThemesFromGlobals utils
Export a new util method `getThemesFromGlobals` to easily generate theme with its variant only by providing a partial globals object. By default it returns both available theme variants (light & dark). Through options you can prefix variant property keys, only generate theme with a subset of variant and also overrides/extend theme.
This commit is contained in:
committed by
Jean-Baptiste PENRATH
parent
fe8eb4b802
commit
db26e21b88
@@ -26,12 +26,11 @@
|
||||
"lint": "eslint . 'src/**/*.{ts,tsx}'",
|
||||
"dev": "nodemon --watch 'src/bin' --ext '*' --exec 'yarn build'",
|
||||
"build-bin": "cd src/bin && rm -rf ../../dist/bin && tsc -p tsconfig.build.json && tsc-alias && chmod +x ../../dist/bin/Main.js",
|
||||
"build-lib": "cp dist/cunningham-tokens.ts src/lib && cd src/lib && tsc -p tsconfig.json",
|
||||
"build-lib": "cp src/bin/cunningham.ts src/lib && cp dist/cunningham-tokens.ts src/lib && cd src/lib && tsc -p tsconfig.json",
|
||||
"build": "yarn build-bin && yarn build-default-theme && yarn build-lib && cd ../.. && ln -sf ../../packages/tokens/dist/bin/Main.js node_modules/.bin/cunningham",
|
||||
"build-default-theme": "node ./dist/bin/Main.js -o dist -s html -g scss,css,js,ts --utility-classes",
|
||||
"test": "cross-env FORCE_COLOR=1 jest --runInBand --verbose src",
|
||||
"test-ci": "cross-env FORCE_COLOR=1 jest --runInBand src",
|
||||
"figma-to-cunningham": "ts-node FigmaToCunningham.ts"
|
||||
"test-ci": "cross-env FORCE_COLOR=1 jest --runInBand src"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "4.1.2",
|
||||
|
||||
Reference in New Issue
Block a user