Skip to content

Commit 24c0cbe

Browse files
committed
Add static block variation and update create block script
1 parent f5893f7 commit 24c0cbe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

inc/block-template/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
},
2727
},
2828
variants: {
29+
static: {},
2930
dynamic: {},
3031
interactive: {
3132
viewScriptModule: 'file:./view.js',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
"scripts": {
7676
"a11y": "node a11y.cjs",
7777
"build": "wp-scripts build --config webpack.config.js --webpack-src-dir=assets/blocks --stats-error-details --progress",
78-
"create-block": "cd ./assets/blocks && npx @wordpress/create-block --namespace=wdsbt --template ../../inc/block-template --no-plugin",
78+
"create-block": "run-s create-block:run",
79+
"create-block:run": "cd ./assets/blocks && npx @wordpress/create-block --namespace=wdsbt --template ../../inc/block-template --no-plugin",
7980
"format": "wp-scripts format && npm run format:php",
8081
"format:css": "wp-scripts format-style",
8182
"format:php": "composer run-script phpcs-fix",

0 commit comments

Comments
 (0)