@corex-ui/cli
v0.2.2
Published
Corex CLI
Downloads
62
Readme
@corex-ui/cli
CLI tool for rendering Corex UI static components post-build.
Allows prerendering components in any dist folder to static HTML.
For the complete Corex UI ecosystem, documentation, and advanced guides, visit Corex UI Official Docs.
✨ Features
- 🏗️ Renders Corex UI components in generated HTML
- 🎯 Selective rendering: choose which components to render
- ⚡ Works seamlessly with @corex-ui/static
📦 Installation
Globally:
npm install -g @corex-ui/cliOr locally:
npm install --save-dev @corex-ui/cli🚀 Usage
corex-ui render <dist> [components...]<dist>: Path to the output folder containing HTML files (required)[components...]: List of components to render. Default: all components
Examples
# Render all components in dist/
corex-ui render dist
# Render only "button" and "accordion"
corex-ui render dist button accordion⚙️ How It Works
- Scans the specified output folder (
dist/) for HTML files - Loads Corex UI component modules from
node_modules/@corex-ui/static/dist/components - Detects matching component placeholders in HTML
- Calls each component's
initialize<ComponentName>function inside a JSDOM instance - Writes the modified HTML back to disk
Logs show how many components were rendered per file.
