create-widy-widget
v1.0.10
Published
A CLI tool to scaffold a Widy widget project from templates.
Downloads
33
Readme
create-widy-widget
A CLI tool to scaffold a Widy widget project from templates.
What it does
create-widy-widget prompts for a project name, framework, and language variant, then copies the matching template into a new project folder and generates a basic manifest.json.
Usage
npm create widy-widget@latestThen follow the prompts:
- Project name
- Framework (
React) - Variant (
TypeScriptorJavaScript)
After scaffolding, run:
cd <project-name>
npm install
npm run buildAdd dist folder to the Widy app in widgets "Add widget".
Release
- Fork
https://github.com/widy-fun/widgets. - Add your generated widget project to the fork's
widgetsfolder. - Ensure the widget's
manifest.jsoncontains a uniqueid. - Add the widget manifest entry with the unique widget id to
widgets.jsonin the fork.
Templates
The generator uses templates stored under templates/react:
js— JavaScript React widget templatets— TypeScript React widget template
Requirements
- Node.js 16+
- npm
Notes
- The CLI creates a
manifest.jsonin the scaffolded project root. - The tool currently supports only the React framework.
