Development Server
cem serve is a specialized dev server for custom elements, offering live reload, interactive knobs, and component isolation based on your manifest demos.
Getting Started
Set up your first demo
Buildless Development
TypeScript and CSS without build steps
Knobs
Interactive testing controls
Import Maps
Use npm packages without bundling
Command Reference
Command flags and usage
Quick Start
cem serveStarts the server on http://localhost:8000.
cem serve is for developing custom elements in isolation, not a general-purpose dev server.
Features
- Manifest-Driven: Demos derive directly from your
custom-elements.json. - Demo Chrome: A PatternFly-based UI with a navigation drawer, component documentation, and theme toggles.
- Interactive Knobs: Auto-generated controls for attributes, properties, and CSS variables.
- TypeScript Support: On-the-fly compilation with source maps.
- Workspace Support: Seamlessly handles multi-package repositories.
Navigation
The server lists all elements at the root (/) and provides a persistent drawer to jump between demos. You can also access demos directly via /demo/{element-name}/ or /pkg/{scope}/{package}/demo/{element-name}/ for workspaces.