From a2bd26a4af7b725c4c1dd084f19759fc77a8f275 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 23 Sep 2022 15:49:21 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20theme.json=20generator=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bud.config.mjs | 52 +++++++++++++++++++++++++------------------------- theme.json | 21 +++++++++++--------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/bud.config.mjs b/bud.config.mjs index ff267c0..cb4036f 100644 --- a/bud.config.mjs +++ b/bud.config.mjs @@ -46,31 +46,31 @@ export default async (app) => { * * @note This overwrites `theme.json` on every build. */ - .themeJson({ - color: { - custom: false, - customGradient: false, - defaultPalette: false, - defaultGradients: false, - }, - custom: { - spacing: {}, - typography: { - 'font-size': {}, - 'line-height': {}, + .wpjson + .useTailwindColors() + .useTailwindFontFamily() + .useTailwindFontSize() + .settings({ + color: { + custom: false, + customGradient: false, + defaultPalette: false, + defaultGradients: false, }, - }, - spacing: { - padding: true, - units: ['px', '%', 'em', 'rem', 'vw', 'vh'], - }, - typography: { - customFontSize: false, - }, - }) - - /** - * Set `theme.json` colors from `tailwind.config.js` values - */ - .useTailwindColors(); + custom: { + spacing: {}, + typography: { + 'font-size': {}, + 'line-height': {}, + }, + }, + spacing: { + padding: true, + units: ['px', '%', 'em', 'rem', 'vw', 'vh'], + }, + typography: { + customFontSize: false, + }, + }) + .enable() }; diff --git a/theme.json b/theme.json index 1f7779f..d08288d 100644 --- a/theme.json +++ b/theme.json @@ -1,17 +1,13 @@ { + "__generated__": "⚠️ This file is generated. Do not edit.", "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 2, "settings": { "color": { "custom": false, "customGradient": false, - "palette": [ - { - "name": "Primary", - "slug": "primary", - "color": "#525ddc" - } - ] + "defaultPalette": false, + "defaultGradients": false }, "custom": { "spacing": {}, @@ -22,10 +18,17 @@ }, "spacing": { "padding": true, - "units": ["px", "%", "em", "rem", "vw", "vh"] + "units": [ + "px", + "%", + "em", + "rem", + "vw", + "vh" + ] }, "typography": { "customFontSize": false } } -} +} \ No newline at end of file