@wordpress/create-block 4.22.0 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/init-block.js CHANGED
@@ -32,6 +32,7 @@ async function initBlockJSON( {
32
32
  render,
33
33
  viewScript,
34
34
  customBlockJSON,
35
+ example,
35
36
  } ) {
36
37
  info( '' );
37
38
  info( 'Creating a "block.json" file.' );
@@ -53,6 +54,7 @@ async function initBlockJSON( {
53
54
  category,
54
55
  icon: dashicon,
55
56
  description,
57
+ example,
56
58
  attributes,
57
59
  supports,
58
60
  textdomain,
package/lib/scaffold.js CHANGED
@@ -48,6 +48,7 @@ module.exports = async (
48
48
  variantVars,
49
49
  customPackageJSON,
50
50
  customBlockJSON,
51
+ example,
51
52
  }
52
53
  ) => {
53
54
  slug = slug.toLowerCase();
@@ -107,6 +108,7 @@ module.exports = async (
107
108
  viewScript,
108
109
  customPackageJSON,
109
110
  customBlockJSON,
111
+ example,
110
112
  ...variantVars,
111
113
  };
112
114
 
package/lib/templates.js CHANGED
@@ -34,6 +34,7 @@ const predefinedPluginTemplates = {
34
34
  editorStyle: null,
35
35
  style: null,
36
36
  viewScript: 'file:./view.js',
37
+ example: {},
37
38
  },
38
39
  templatesPath: join( __dirname, 'templates', 'es5' ),
39
40
  variants: {
@@ -55,6 +56,7 @@ const predefinedPluginTemplates = {
55
56
  html: false,
56
57
  },
57
58
  viewScript: 'file:./view.js',
59
+ example: {},
58
60
  },
59
61
  variants: {
60
62
  static: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/create-block",
3
- "version": "4.22.0",
3
+ "version": "4.23.0",
4
4
  "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,7 +31,7 @@
31
31
  "wp-create-block": "./index.js"
32
32
  },
33
33
  "dependencies": {
34
- "@wordpress/lazy-import": "^1.25.0",
34
+ "@wordpress/lazy-import": "^1.26.0",
35
35
  "chalk": "^4.0.0",
36
36
  "change-case": "^4.1.2",
37
37
  "check-node-version": "^4.1.0",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
51
+ "gitHead": "b898cf1dc8e70841d1647ea0994ac6278acc18a7"
52
52
  }