@donmhico/create-wds-block v0.0.2
Create WDS Block
This is forked from @wordpress/create-block.
Description
Blocks are the fundamental element of the WordPress block editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
Visit the Gutenberg handbook to learn more about Block API.
Requirement
I recommend that you use the latest version of both Node and NPM. I highly recommend NVM to easily install and switch Node versions.
Usage
The following command generates PHP, JS and CSS code for registering a block.
You just need to provide the <Namespace/BlockName>
.
$ npm init @donmhico/wds-block WebDevStudios/TodoList
$ cd todo-list
$ npm start
You don’t need to install or configure tools like webpack, Babel or ESLint yourself. They are preconfigured and hidden so that you can focus on the code.
Options:
-V, --version output the version number
-h, --help output usage information
Please note that --version
and --help
options don't work with npm init
. You have to use npx
instead, as presented in the examples.