Merge pull request #3111 from roots/km-6.6.6

📦 bump: 6.6.6
This commit is contained in:
Kelly Mears
2023-01-03 12:17:57 -08:00
committed by GitHub
10 changed files with 1329 additions and 1140 deletions

View File

@@ -7,6 +7,7 @@ insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
quote_type = single
[*.md]
trim_trailing_whitespace = false

88
bud.config.js Normal file
View File

@@ -0,0 +1,88 @@
/**
* Build configuration
*
* @see {@link https://roots.io/docs/sage/ sage documentation}
* @see {@link https://bud.js.org/guides/configure/ bud.js configuration guide}
*
* @typedef {import('@roots/bud').Bud} Bud
* @param {Bud} app
*/
export default async (app) => {
/**
* Application entrypoints
* @see {@link https://bud.js.org/docs/bud.entry/}
*/
app
.entry({
app: ['@scripts/app', '@styles/app'],
editor: ['@scripts/editor', '@styles/editor'],
})
/**
* Directory contents to be included in the compilation
* @see {@link https://bud.js.org/docs/bud.assets/}
*/
.assets(['images'])
/**
* Matched files trigger a page reload when modified
* @see {@link https://bud.js.org/docs/bud.watch/}
*/
.watch(['resources/views', 'app'])
/**
* Proxy origin (`WP_HOME`)
* @see {@link https://bud.js.org/docs/bud.proxy/}
*/
.proxy('http://example.test')
/**
* Development origin
* @see {@link https://bud.js.org/docs/bud.serve/}
*/
.serve('http://0.0.0.0:3000')
/**
* URI of the `public` directory
* @see {@link https://bud.js.org/docs/bud.setPublicPath/}
*/
.setPublicPath('/app/themes/sage/public/')
/**
* Generate WordPress `theme.json`
*
* @note This overwrites `theme.json` on every build.
*
* @see {@link https://bud.js.org/extensions/sage/theme.json/}
* @see {@link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/}
*/
.wpjson.settings({
color: {
custom: false,
customDuotone: false,
customGradient: false,
defaultDuotone: false,
defaultGradients: false,
defaultPalette: false,
duotone: [],
},
custom: {
spacing: {},
typography: {
'font-size': {},
'line-height': {},
},
},
spacing: {
padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
},
typography: {
customFontSize: false,
},
})
.useTailwindColors()
.useTailwindFontFamily()
.useTailwindFontSize()
.enable();
};

View File

@@ -1,79 +0,0 @@
// @ts-check
/**
* Build configuration
*
* @see {@link https://bud.js.org/guides/configure}
* @param {import('@roots/bud').Bud} app
*/
export default async (app) => {
app
/**
* Application entrypoints
*/
.entry({
app: ["@scripts/app", "@styles/app"],
editor: ["@scripts/editor", "@styles/editor"],
})
/**
* Directory contents to be included in the compilation
*/
.assets(["images"])
/**
* Matched files trigger a page reload when modified
*/
.watch(["resources/views/**/*", "app/**/*"])
/**
* Proxy origin (`WP_HOME`)
*/
.proxy("http://example.test")
/**
* Development origin
*/
.serve("http://0.0.0.0:3000")
/**
* URI of the `public` directory
*/
.setPublicPath("/app/themes/sage/public/")
/**
* Generate WordPress `theme.json`
*
* @note This overwrites `theme.json` on every build.
*/
.wpjson
.settings({
color: {
custom: false,
customDuotone: false,
customGradient: false,
defaultDuotone: false,
defaultGradients: false,
defaultPalette: false,
duotone: [],
},
custom: {
spacing: {},
typography: {
'font-size': {},
'line-height': {},
},
},
spacing: {
padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
},
typography: {
customFontSize: false,
},
})
.useTailwindColors()
.useTailwindFontFamily()
.useTailwindFontSize()
.enable()
};

View File

@@ -1,19 +1,15 @@
{
"extends": "@roots/sage/config/jsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": "resources",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "esnext",
"moduleResolution": "node",
"jsx": "preserve",
"paths": {
"@fonts/*": ["fonts/*"],
"@images/*": ["images/*"],
"@scripts/*": ["scripts/*"],
"@styles/*": ["styles/*"]
},
"target": "es5"
"types": ["@roots/bud", "@roots/sage", "@roots/bud-tailwindcss"]
},
"include": ["bud.config.mjs", "resources"],
"exclude": ["public"]
"include": ["bud.config.js", "resources"],
"exclude": ["node_modules", "public"]
}

View File

@@ -2,11 +2,12 @@
"name": "sage",
"private": true,
"browserslist": [
"extends @roots/browserslist-config/current"
"extends @roots/browserslist-config"
],
"engines": {
"node": ">=16.0.0"
},
"type": "module",
"scripts": {
"dev": "bud dev",
"build": "bud build",
@@ -18,8 +19,8 @@
"translate:mo": "wp i18n make-mo ./resources/lang ./resources/lang"
},
"devDependencies": {
"@roots/bud": "6.6.2",
"@roots/bud-tailwindcss": "6.6.2",
"@roots/sage": "6.6.2"
"@roots/bud": "6.6.9",
"@roots/bud-tailwindcss": "6.6.9",
"@roots/sage": "6.6.9"
}
}

View File

@@ -1,21 +1,13 @@
import {domReady} from '@roots/sage/client';
import domReady from '@roots/sage/client/dom-ready';
/**
* app.main
* Application entrypoint
*/
const main = async (err) => {
if (err) {
// handle hmr errors
console.error(err);
}
// application code
};
domReady(async () => {
// ...
});
/**
* Initialize
*
* @see https://webpack.js.org/api/hot-module-replacement
* @see {@link https://webpack.js.org/api/hot-module-replacement/}
*/
domReady(main);
import.meta.webpackHot?.accept(main);
import.meta.webpackHot?.accept(console.error);

View File

@@ -1,27 +1,19 @@
import {domReady} from '@roots/sage/client';
import {registerBlockStyle, unregisterBlockStyle} from '@wordpress/blocks';
import domReady from '@roots/sage/client/dom-ready';
import { registerBlockStyle, unregisterBlockStyle } from '@wordpress/blocks';
/**
* editor.main
* Editor entrypoint
*/
const main = (err) => {
if (err) {
// handle hmr errors
console.error(err);
}
domReady(() => {
unregisterBlockStyle('core/button', 'outline');
registerBlockStyle('core/button', {
name: 'outline',
label: 'Outline',
});
};
});
/**
* Initialize
*
* @see https://webpack.js.org/api/hot-module-replacement
* @see {@link https://webpack.js.org/api/hot-module-replacement/}
*/
domReady(main);
import.meta.webpackHot?.accept(main);
import.meta.webpackHot?.accept(console.error);

View File

@@ -1,6 +1,6 @@
// https://tailwindcss.com/docs/configuration
module.exports = {
content: ["./index.php", "./app/**/*.php", "./resources/**/*.{php,vue,js}"],
content: ['./index.php', './app/**/*.php', './resources/**/*.{php,vue,js}'],
theme: {
extend: {
colors: {}, // Extend Tailwind's default colors

View File

@@ -5,9 +5,12 @@
"settings": {
"color": {
"custom": false,
"customDuotone": false,
"customGradient": false,
"defaultPalette": false,
"defaultDuotone": false,
"defaultGradients": false,
"defaultPalette": false,
"duotone": [],
"palette": [
{
"name": "Inherit",
@@ -1158,17 +1161,17 @@
"customFontSize": false,
"fontFamilies": [
{
"name": "ui-sans-serif",
"name": "Ui-sans-serif",
"slug": "sans",
"fontFamily": "ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\""
},
{
"name": "ui-serif",
"name": "Ui-serif",
"slug": "serif",
"fontFamily": "ui-serif,Georgia,Cambria,\"Times New Roman\",Times,serif"
},
{
"name": "ui-monospace",
"name": "Ui-monospace",
"slug": "mono",
"fontFamily": "ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace"
}

2223
yarn.lock

File diff suppressed because it is too large Load Diff