File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1- //README
21# Style Dictionary Tailwind CSS Transformer
32
43[ ![ Release] ( https://badgen.net/github/release/nado1001/sd-tailwindcss-transformer )] ( https://badgen.net/github/release/nado1001/sd-tailwindcss-transformer )
@@ -192,7 +191,7 @@ Optional except for `type`.
192191| type | Set the name of each theme (colors, fontSize, etc.) for ` 'all' ` or tailwind. | ` 'all' ` or string |
193192| formatType | Set the format of the Tailwind CSS configuration file. <br >Default value: ` js ` | ` 'js' ` ` 'cjs' ` |
194193| isVariables | Set when using CSS custom variables. <br >Default value: ` false ` | boolean |
195- | extend | Set to add transformed styles to the ` 'extend' ` key within the ` 'theme' ` key or not. <br >Default value: ` true ` | boolean |
194+ | extend | Set to add transformed styles to the ` 'extend' ` key within the ` 'theme' ` key or not. <br >Default value: ` true ` | boolean |
196195| source | [ ` source ` ] ( https://github.com/amzn/style-dictionary/blob/main/README.md#configjson ) attribute of style-dictionary.<br >Default value: ` ['tokens/**/*.json'] ` | Array of strings |
197196| transforms | [ ` platform.transforms ` ] ( https://github.com/amzn/style-dictionary/blob/main/README.md#configjson ) attribute of style-dictionary.<br >Default value: ` ['attribute/cti','name/cti/kebab'] ` | Array of strings |
198197| buildPath | [ ` platform.buildPath ` ] ( https://github.com/amzn/style-dictionary/blob/main/README.md#configjson ) attribute of style-dictionary.<br >Default value: ` 'build/web/' ` | string |
Original file line number Diff line number Diff line change 1- // index.ts
21import type { Dictionary , Config } from 'style-dictionary/types'
32import type { SdTailwindConfigType , TailwindFormatObjType } from './types'
43import {
@@ -137,4 +136,4 @@ export const makeSdTailwindConfig = ({
137136 }
138137 }
139138 }
140- }
139+ }
Original file line number Diff line number Diff line change 1- //types.ts
21import type { Dictionary } from 'style-dictionary/types/Dictionary'
32import type { Platform } from 'style-dictionary/types/Platform'
43import type { Config } from 'style-dictionary/types/Config'
@@ -33,4 +32,4 @@ export type TailwindFormatObjType = Pick<
3332> & {
3433 dictionary : Dictionary
3534 formatType : TailwindFormatType
36- }
35+ }
Original file line number Diff line number Diff line change 1- //utils.ts
21import { camelCase } from 'change-case'
32import type { SdObjType , SdTailwindConfigType , TailwindOptions } from './types'
43
@@ -66,9 +65,9 @@ export const getTemplateConfigByType = (
6665 extend : SdTailwindConfigType [ 'extend' ] ,
6766 plugins : string [ ]
6867) => {
69- const extendTheme = extend ?
70- `theme: { extend: ${ unquoteFromKeys ( content , type ) } , },` :
71- `theme: ${ unquoteFromKeys ( content , type ) } ,`
68+ const extendTheme = extend
69+ ? `theme: { extend: ${ unquoteFromKeys ( content , type ) } , },`
70+ : `theme: ${ unquoteFromKeys ( content , type ) } ,`
7271
7372 const getTemplateConfig = ( ) => {
7473 let config = `{
@@ -89,4 +88,4 @@ export const getTemplateConfigByType = (
8988 const configs = `/** @type {import('tailwindcss').Config} */\n module.exports = ${ getTemplateConfig ( ) } `
9089
9190 return configs
92- }
91+ }
You can’t perform that action at this time.
0 commit comments