πŸ’¦ FULL SET: WordPress/gutenberg/issues/ - Complete Album!

Skip to content

Create-block package: External Project Template Custom prompts?Β #47524

@eduwass

Description

@eduwass

What problem does this address?

When creating a new block or plugin using the @create-block package we are limited to a certain number of parameters that we are prompted, it would be awesome if we could add more to the list, based on our custom configuration.

See: https://github.com/WordPress/gutenberg/blob/trunk/packages/create-block/lib/prompts.js

If this is already possible and I'm missing something, please let me know!

What is your proposed solution?

In this file: https://github.com/WordPress/gutenberg/blob/trunk/packages/create-block/lib/templates.js#L220

There is a getDefaultValues and getPrompts, maybe when someone defines params DefaultValues that are not predefined, we still prompt for them so they are later available in mustache when scaffolding the block?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions