Skip to content

Create block templates for different block types #51

Description

@cr0ybot

We have at least 3 different kinds of blocks we create often:

  1. Static, vanilla JS
  2. Dynamic, vanilla JS with PHP render on front-end
  3. ACF, new formula that uses block.json

Ideally, we could create templates for these 3 block types and put them somewhere in the scaffolding that could then be utilized by an npm command to scaffold a block.

Something like:

npx @wordpress/create-block --template ./path/to/template-directory --no-plugin

We should be able to add the command to scripts in package.json in order to point to the correct template path and block src path.

See https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions