Node.js CLI script to create Gutenberg blocks for kwio/gutenberg-blocks.
npx github:wellmann/create-block <name> [options]
- Run custom script to create block with boilerplate code.
To create custom blocks run npx github:wellmann/create-block <name>
. The blocks folder will be created in src/<name>
along with the required files and boilerplate code.
Flag | Alias | Description |
---|---|---|
--dynamic |
-d |
A block.php file will be added to the blocks folder. |
--fullwidth |
-w |
Make block fullwidth by default. |
--shared-atts |
-a |
An attributes.json file will be added to the blocks folder. |
--critical |
-c |
Instead of a style.scss a style.critical.scss and an editor.scss file will be added to the blocks folder. |
--script-js |
-j |
A script.js file will be added to the blocks folder. |
--editor-css |
-e |
An editor.scss file will be added to the blocks folder. |
--help |
-h |
Display help for command. |