@spark-ui/cli-utils
Advanced tools
Comparing version 2.2.7 to 2.3.0
@@ -6,2 +6,8 @@ # Change Log | ||
# [2.3.0](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.2.7...@spark-ui/cli-utils@2.3.0) (2023-03-02) | ||
### Features | ||
- **cli-utils:** update toTailwindConfig mapper to handle edge cases ([2af919a](https://github.com/adevinta/spark/commit/2af919a3dd7bbab02d00cd9892c1e9a7971aec38)) | ||
## [2.2.7](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.2.6...@spark-ui/cli-utils@2.2.7) (2023-03-02) | ||
@@ -8,0 +14,0 @@ |
{ | ||
"name": "@spark-ui/cli-utils", | ||
"version": "2.2.7", | ||
"version": "2.3.0", | ||
"description": "Spark CLI utils", | ||
@@ -32,3 +32,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "84648617bfcf9bd9feac25d86c2d9a68a2a9cc72" | ||
"gitHead": "3507d96e9064fe42e519ea143866c683d954074d" | ||
} |
@@ -6,1 +6,9 @@ export const tailwindKeys = { | ||
} | ||
export const DEFAULT_KEY = 'DEFAULT' | ||
export const defaultColors = { | ||
inherit: 'inherit', | ||
current: 'currentColor', | ||
transparent: 'transparent', | ||
} |
@@ -6,3 +6,3 @@ import { writeFileSync } from 'node:fs' | ||
import { tailwindKeys } from './constants.js' | ||
import { DEFAULT_KEY, defaultColors, tailwindKeys } from './constants.js' | ||
import { | ||
@@ -64,2 +64,6 @@ doubleHyphensRegex, | ||
Object.keys(value).forEach(k => { | ||
if (k === DEFAULT_KEY) { | ||
return | ||
} | ||
if (!isObject(value[k]) && !isCamelCase(k)) { | ||
@@ -90,3 +94,3 @@ return | ||
return `var(--${paths.join('-')}-${key})` | ||
return `var(--${paths.join('-')}-${key.toLowerCase()})` | ||
})() | ||
@@ -103,3 +107,3 @@ | ||
return themeCpy | ||
return { ...themeCpy, colors: { ...themeCpy.colors, ...defaultColors } } | ||
} | ||
@@ -106,0 +110,0 @@ |
34036
723