@24hr/block-cli
v1.0.2
Published
Generates block files
Downloads
10
Maintainers
Keywords
Readme
Block CLI
This is a handy CLI tool to generate Gutenberg block files that follows the Resurs Bank project's pattern.
How to use
Either install i globally with npm install -g @24hr/block-cli
or run it with npx
If installed globally you can run block-cli
.
Commands:
block-cli generate <blockName> Generate block files
block-cli completion generate completion script
Options:
--version Show version number [boolean]
--help Show help [boolean]
Generate block
By running the generate
command followed by the block name will generate all files to the current directory. Be sure that you run this command at the root of the folder where you want the block files to be generated.
NOTE that the CLI will always put the files in a new folder.
Examples
Generate block:
block-cli generate my-new-block
Generate block with custom title in Gutenberg editor
block-cli generate my-new-block --title "My New Custom Block"