@wordpress/create-block 4.23.0 → 4.24.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/README.md +8 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ _It is largely inspired by [create-react-app](https://create-react-app.dev/docs/
|
|
|
23
23
|
## Quick start
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
$ npx @wordpress/create-block todo-list
|
|
26
|
+
$ npx @wordpress/create-block@latest todo-list
|
|
27
27
|
$ cd todo-list
|
|
28
28
|
$ npm start
|
|
29
29
|
```
|
|
@@ -41,7 +41,7 @@ _(requires `node` version `14.0.0` or above, and `npm` version `6.14.4` or above
|
|
|
41
41
|
The `create-block` command generates a project with PHP, JS, and CSS code for registering a block with a WordPress plugin.
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
$ npx @wordpress/create-block [options] [slug]
|
|
44
|
+
$ npx @wordpress/create-block@latest [options] [slug]
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|

|
|
@@ -89,13 +89,13 @@ The rest of the configuration is set to all default values unless overridden wit
|
|
|
89
89
|
This argument specifies an _external npm package_ as a template.
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
$ npx @wordpress/create-block --template my-template-package
|
|
92
|
+
$ npx @wordpress/create-block@latest --template my-template-package
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
This argument also allows to pick a _local directory_ as a template.
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
$ npx @wordpress/create-block --template ./path/to/template-directory
|
|
98
|
+
$ npx @wordpress/create-block@latest --template ./path/to/template-directory
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
#### `--variant`
|
|
@@ -103,7 +103,7 @@ $ npx @wordpress/create-block --template ./path/to/template-directory
|
|
|
103
103
|
With this argument, `create-block` will generate a [dynamic block](https://developer.wordpress.org/block-editor/explanations/glossary/#dynamic-block) based on the built-in template.
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
$ npx @wordpress/create-block --variant dynamic
|
|
106
|
+
$ npx @wordpress/create-block@latest --variant dynamic
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
#### `--help`
|
|
@@ -111,7 +111,7 @@ $ npx @wordpress/create-block --variant dynamic
|
|
|
111
111
|
With this argument, the `create-block` package outputs usage information.
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
$ npx @wordpress/create-block --help
|
|
114
|
+
$ npx @wordpress/create-block@latest --help
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
#### `--no-plugin`
|
|
@@ -119,14 +119,14 @@ $ npx @wordpress/create-block --help
|
|
|
119
119
|
With this argument, the `create-block` package runs in _No plugin mode_ which only scaffolds block files into the current directory.
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
$ npx @wordpress/create-block --no-plugin
|
|
122
|
+
$ npx @wordpress/create-block@latest --no-plugin
|
|
123
123
|
```
|
|
124
124
|
#### `--wp-env`
|
|
125
125
|
|
|
126
126
|
With this argument, the `create-block` package will add to the generated plugin the configuration and the script to run [`wp-env` package](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) within the plugin. This will allow you to easily set up a local WordPress environment (via Docker) for building and testing the generated plugin.
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
$ npx @wordpress/create-block --wp-env
|
|
129
|
+
$ npx @wordpress/create-block@latest --wp-env
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
## Available commands in the scaffolded project
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/create-block",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.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.27.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": "78a288d55b83a713b2f7d98d5a855c0771a2afc6"
|
|
52
52
|
}
|