@viingx/create-extension
v0.1.0-preview.11
Published
Scaffold a viingx client extension project — npm create @viingx/extension
Readme
@viingx/create-extension
Official scaffolder for viingx client extensions — one command sets up a ready-to-run project:
npm create @viingx/extension@latestThe prompts let you pick the extension type and name, and optionally connect your Hub right away:
with a Hub URL and API key, the scaffolder writes a gitignored .env (used by npm run deploy
and codegen), installs dependencies, and — when the key can read type definitions — generates
typed entity payloads into src/content-hub.generated.ts. Or run non-interactively:
npm create @viingx/extension@latest my-panel -- --type action-side-panel --name MyPanel \
--hub-url https://<instance>.viingx.io --hub-key <api-key>Both --hub-url/--hub-key are optional (as is the prompt — Enter skips it); --no-install
skips the dependency install and codegen bootstrap. Every Hub step is best-effort: offline or
with a key that can't read type definitions, the scaffold still succeeds and prints the manual
steps instead.
Extension types: action-dialog · action-side-panel · entity-form-element · page-form-element
Preview release (
0.1.0-preview.x). Pin@latest: without a versionnpm createcan re-run a stale copy from its cache, so@latest(always the current release) keeps you on it.
What you get
A ready-to-run TypeScript + React 19 + Fluent UI v8 project (the UI toolkit the viingx client
itself uses, pre-wired with the tenant's theme palette), using
@viingx/extension-sdk (the typed bridge to the
viingx client) and @viingx/content-hub-sdk
(typed REST access). Included: a webpack dev server for live development against your viingx system,
eslint + prettier, agent docs (AGENTS.md/CLAUDE.md) for AI coding assistants, and a one-command
deploy:
cd my-panel
npm install
npm run build # produce the uploadable extension zip
# add a gitignored .env (keeps the key out of your shell history):
# HUB_URL=https://<instance>.viingx.io
# HUB_KEY=<api-key>
# the deploy key needs create+update on extensions/* (codegen also needs read on type/*);
# get one under System administration > Users > <your user>
npm run deploy # reads HUB_URL/HUB_KEY from .env
# place the extension in the client — on an action, type, or page (see the project README) — then:
npm run dev # dev server proxying your Hub (DEVELOPMENT_SYSTEM in webpack.config.js)Typed payloads (optional): codegen is pre-wired — npm run codegen:pull (mirror your tenant's
type definitions; needs a key with read on type/*) then npm run codegen (offline) regenerate
the typed client. Re-run them whenever your tenant's types change. With --hub-url/--hub-key, the
scaffolder already ran this for you.
The @viingx family: this package (scaffold a client-extension project) · @viingx/extension-sdk (the typed bridge to the web client — scaffolded in for you) · @viingx/content-hub-sdk (talk to the Hub's REST API) · @viingx/content-hub-codegen (generate a fully-typed client from your tenant's types).
License
Apache-2.0. The scaffolded project is yours — no license restrictions apply to the generated code.
