Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦✨ bump: 6.6.9 #3111

Merged
merged 8 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
88 changes: 88 additions & 0 deletions bud.config.js
Original file line number Diff line number Diff line change
@@ -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();
};
79 changes: 0 additions & 79 deletions bud.config.mjs

This file was deleted.

12 changes: 4 additions & 8 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
22 changes: 7 additions & 15 deletions resources/scripts/app.js
Original file line number Diff line number Diff line change
@@ -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);
22 changes: 7 additions & 15 deletions resources/scripts/editor.js
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 7 additions & 4 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
"settings": {
"color": {
"custom": false,
"customDuotone": false,
"customGradient": false,
"defaultPalette": false,
"defaultDuotone": false,
"defaultGradients": false,
"defaultPalette": false,
"duotone": [],
"palette": [
{
"name": "Inherit",
Expand Down Expand Up @@ -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"
}
Expand Down
Loading