🚧 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,7 +46,11 @@ export default async (app) => {
* *
* @note This overwrites `theme.json` on every build. * @note This overwrites `theme.json` on every build.
*/ */
.themeJson({ .wpjson
.useTailwindColors()
.useTailwindFontFamily()
.useTailwindFontSize()
.settings({
color: { color: {
custom: false, custom: false,
customGradient: false, customGradient: false,
@@ -68,9 +72,5 @@ export default async (app) => {
customFontSize: false, customFontSize: false,
}, },
}) })
.enable()
/**
* Set `theme.json` colors from `tailwind.config.js` values
*/
.useTailwindColors();
}; };

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,7 +18,14 @@
}, },
"spacing": { "spacing": {
"padding": true, "padding": true,
"units": ["px", "%", "em", "rem", "vw", "vh"] "units": [
"px",
"%",
"em",
"rem",
"vw",
"vh"
]
}, },
"typography": { "typography": {
"customFontSize": false "customFontSize": false