-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
The @wordpress/create-block-interactive-template package currently exposes three variants in index.js, but the README makes no mention of them — not their names, not their purpose, and not how to invoke them.
Variants defined in index.js (but undocumented)
| Variant | Description |
|---|---|
default |
Standard interactive block using the Interactivity API |
typescript |
Interactive block using the Interactivity API with TypeScript |
client-side-navigation |
Interactive block demonstrating client-side navigation via @wordpress/interactivity-router |
Expected behaviour
The README should list all available variants with a short description of each, and show how to invoke them using the --variant flag, e.g.:
npx @wordpress/create-block --template @wordpress/create-block-interactive-template --variant typescriptCurrent README content
The README only documents the base usage command with no mention of variants:
npx @wordpress/create-block --template @wordpress/create-block-interactive-templateWhy it matters
Without this documentation, users have no way to discover TypeScript support or the client-side navigation variant unless they read the package source. This is a significant discoverability problem, especially for new contributors exploring the Interactivity API.
Suggested fix
Add a "Variants" section to the README listing each variant, its purpose, the exact command to use it, and any additional dependencies it pulls in (e.g. @wordpress/interactivity-router for client-side-navigation).