@wordpress/create-block 4.20.0 → 4.22.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 +2 -0
- package/lib/scaffold.js +2 -0
- package/lib/templates/block/view.js.mustache +3 -0
- package/lib/templates.js +2 -0
- package/package.json +3 -3
package/lib/init-block.js
CHANGED
|
@@ -30,6 +30,7 @@ async function initBlockJSON( {
|
|
|
30
30
|
editorStyle,
|
|
31
31
|
style,
|
|
32
32
|
render,
|
|
33
|
+
viewScript,
|
|
33
34
|
customBlockJSON,
|
|
34
35
|
} ) {
|
|
35
36
|
info( '' );
|
|
@@ -59,6 +60,7 @@ async function initBlockJSON( {
|
|
|
59
60
|
editorStyle,
|
|
60
61
|
style,
|
|
61
62
|
render,
|
|
63
|
+
viewScript,
|
|
62
64
|
...customBlockJSON,
|
|
63
65
|
} ).filter( ( [ , value ] ) => !! value )
|
|
64
66
|
),
|
package/lib/scaffold.js
CHANGED
|
@@ -44,6 +44,7 @@ module.exports = async (
|
|
|
44
44
|
editorStyle,
|
|
45
45
|
style,
|
|
46
46
|
render,
|
|
47
|
+
viewScript,
|
|
47
48
|
variantVars,
|
|
48
49
|
customPackageJSON,
|
|
49
50
|
customBlockJSON,
|
|
@@ -103,6 +104,7 @@ module.exports = async (
|
|
|
103
104
|
editorStyle,
|
|
104
105
|
style,
|
|
105
106
|
render,
|
|
107
|
+
viewScript,
|
|
106
108
|
customPackageJSON,
|
|
107
109
|
customBlockJSON,
|
|
108
110
|
...variantVars,
|
package/lib/templates.js
CHANGED
|
@@ -33,6 +33,7 @@ const predefinedPluginTemplates = {
|
|
|
33
33
|
editorScript: null,
|
|
34
34
|
editorStyle: null,
|
|
35
35
|
style: null,
|
|
36
|
+
viewScript: 'file:./view.js',
|
|
36
37
|
},
|
|
37
38
|
templatesPath: join( __dirname, 'templates', 'es5' ),
|
|
38
39
|
variants: {
|
|
@@ -53,6 +54,7 @@ const predefinedPluginTemplates = {
|
|
|
53
54
|
supports: {
|
|
54
55
|
html: false,
|
|
55
56
|
},
|
|
57
|
+
viewScript: 'file:./view.js',
|
|
56
58
|
},
|
|
57
59
|
variants: {
|
|
58
60
|
static: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/create-block",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.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.
|
|
34
|
+
"@wordpress/lazy-import": "^1.25.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": "
|
|
51
|
+
"gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
|
|
52
52
|
}
|