Skip to main content

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:

ScriptDescription
devBuild and run widget in standalone mode
buildBuild project for standalone deployment
build_federationBuild project with Module Federation support
start_federationStart local development server with HMR and platform API
testRun unit tests
test_covRun tests with coverage report
analyzeRun the bundle analyzer (aim to keep the main bundle under 200KB gzipped; lazy-load heavy deps)
lintApply ESLint
lint:cssApply stylelint
formatApply Prettier formatting
semantic-releaseCI command for automatic versioning
postinstallRun post-install scripts
pre-commitRun pre-commit hooks

For local development modes (standalone vs. federation), see Running & Versioning in the Reference.