🚧 theme.json generator updates

This commit is contained in:
Ben Word
2022-09-23 15:49:21 -05:00
parent fb8de9a301
commit a2bd26a4af
2 changed files with 38 additions and 35 deletions

View File

@@ -46,31 +46,31 @@ export default async (app) => {
* *
* @note This overwrites `theme.json` on every build. * @note This overwrites `theme.json` on every build.
*/ */
.themeJson({ .wpjson
color: { .useTailwindColors()
custom: false, .useTailwindFontFamily()
customGradient: false, .useTailwindFontSize()
defaultPalette: false, .settings({
defaultGradients: false, color: {
}, custom: false,
custom: { customGradient: false,
spacing: {}, defaultPalette: false,
typography: { defaultGradients: false,
'font-size': {},
'line-height': {},
}, },
}, custom: {
spacing: { spacing: {},
padding: true, typography: {
units: ['px', '%', 'em', 'rem', 'vw', 'vh'], 'font-size': {},
}, 'line-height': {},
typography: { },
customFontSize: false, },
}, spacing: {
}) padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
/** },
* Set `theme.json` colors from `tailwind.config.js` values typography: {
*/ customFontSize: false,
.useTailwindColors(); },
})
.enable()
}; };

View File

@@ -1,17 +1,13 @@
{ {
"__generated__": "⚠️ This file is generated. Do not edit.",
"$schema": "https://schemas.wp.org/trunk/theme.json", "$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2, "version": 2,
"settings": { "settings": {
"color": { "color": {
"custom": false, "custom": false,
"customGradient": false, "customGradient": false,
"palette": [ "defaultPalette": false,
{ "defaultGradients": false
"name": "Primary",
"slug": "primary",
"color": "#525ddc"
}
]
}, },
"custom": { "custom": {
"spacing": {}, "spacing": {},
@@ -22,10 +18,17 @@
}, },
"spacing": { "spacing": {
"padding": true, "padding": true,
"units": ["px", "%", "em", "rem", "vw", "vh"] "units": [
"px",
"%",
"em",
"rem",
"vw",
"vh"
]
}, },
"typography": { "typography": {
"customFontSize": false "customFontSize": false
} }
} }
} }