-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ben Word <[email protected]>
- Loading branch information
1 parent
fc93185
commit f297df0
Showing
8 changed files
with
512 additions
and
548 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [require.resolve('@roots/sage/eslint-config')], | ||
extends: ['@roots/eslint-config/sage'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"baseUrl": ".", | ||
"jsx": "preserve", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"paths": { | ||
"@scripts/*": ["./resources/scripts/*"], | ||
"@styles/*": ["./resources/styles/*"] | ||
}, | ||
"target": "es5" | ||
} | ||
}, | ||
"exclude": ["./public"] | ||
"exclude": ["./public", "./node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 1,21 @@ | ||
import {domReady} from '@roots/sage/client'; | ||
|
||
/** | ||
* Run the application when the DOM is ready. | ||
* app.main | ||
*/ | ||
domReady(() => { | ||
// Application code. | ||
}); | ||
const main = async (err) => { | ||
if (err) { | ||
// handle hmr errors | ||
console.error(err); | ||
} | ||
|
||
// application code | ||
}; | ||
|
||
/** | ||
* Accept module updates | ||
* Initialize | ||
* | ||
* @see https://webpack.js.org/api/hot-module-replacement | ||
*/ | ||
import.meta.webpackHot?.accept(console.error); | ||
domReady(main); | ||
import.meta.webpackHot?.accept(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 1,27 @@ | ||
import {registerBlockStyle, unregisterBlockStyle} from '@wordpress/blocks'; | ||
|
||
import {domReady} from '@roots/sage/client'; | ||
import {registerBlockStyle, unregisterBlockStyle} from '@wordpress/blocks'; | ||
|
||
/** | ||
* Customize block styles | ||
* editor.main | ||
*/ | ||
domReady(() => { | ||
const main = (err) => { | ||
if (err) { | ||
// handle hmr errors | ||
console.error(err); | ||
} | ||
|
||
unregisterBlockStyle('core/button', 'outline'); | ||
|
||
registerBlockStyle('core/button', { | ||
name: 'outline', | ||
label: 'Outline', | ||
}); | ||
}); | ||
}; | ||
|
||
/** | ||
* Accept module updates | ||
* Initialize | ||
* | ||
* @see https://webpack.js.org/api/hot-module-replacement | ||
*/ | ||
import.meta.webpackHot?.accept(console.error); | ||
domReady(main); | ||
import.meta.webpackHot?.accept(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.