Widget Development Overview
Widget development on the INVENT platform involves creating single-page applications (SPAs) using React that integrate with the platform's Dashboard Composer and utilize platform APIs.
Building a widget?
The end-to-end guide — environment setup, scaffolding, architecture, platform features, local dev modes, testing, and deployment — lives in the Widget Development. Start there. This page is a Manual-side quick reference for the repo's npm scripts.
Available NPM Scripts
All scripts are defined in package.json:
| Script | Description |
|---|---|
dev | Build and run widget in standalone mode |
build | Build project for standalone deployment |
build_federation | Build project with Module Federation support |
start_federation | Start local development server with HMR and platform API |
test | Run unit tests |
test_cov | Run tests with coverage report |
analyze | Run the bundle analyzer (aim to keep the main bundle under 200KB gzipped; lazy-load heavy deps) |
lint | Apply ESLint |
lint:css | Apply stylelint |
format | Apply Prettier formatting |
semantic-release | CI command for automatic versioning |
postinstall | Run post-install scripts |
pre-commit | Run pre-commit hooks |
For local development modes (standalone vs. federation), see Running & Versioning in the Reference.
Related Documentation
- Widget Development — the complete widget development guide
- Running & Versioning Your Widget — local development and debugging
- Module Federation — understanding widget loading
- Widget Launch Types — dev vs federation mode details
- Creating an MR — release and deployment via the
gitlab-mrskill - Semantic Versioning and Code Style