Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create block templates for different block types #51

Open
cr0ybot opened this issue Oct 20, 2022 · 0 comments
Open

Create block templates for different block types #51

cr0ybot opened this issue Oct 20, 2022 · 0 comments

Comments

@cr0ybot
Copy link
Member

cr0ybot commented Oct 20, 2022

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant