@pushwoosh/frontend-builder-engine
v3.1.2
Published
Pushwoosh frontend builder engine
Readme
@pushwoosh/frontend-builder-engine
CLI tool and shared build configuration for Pushwoosh single-spa micro-frontend applications and reusable component libraries. Provides standardized webpack, TypeScript, Babel, and ESLint configs so individual projects stay consistent without duplicating setup.
Usage
The CLI is invoked via pushwoosh-engine (installed as a dependency in consuming projects).
Application commands (single-spa micro-frontends)
pushwoosh-engine app:command:dev # Start webpack dev server (HTTPS)
pushwoosh-engine app:command:build # Production build
pushwoosh-engine app:command:analyze # Bundle analysis
pushwoosh-engine app:command:check-dead-code # Unused files, exports and dependencies (knip)app:command:check-dead-code runs knip with the shipped lib/knip.application.json: entries are
src/index.{ts,tsx} plus every src/parcels/**/index.{ts,tsx}, so a file the entry graph never
reaches is reported as unused. Exports used only inside their own file and everything under a
generated/ directory are not reported; the binaries and unlisted rules are off, since consuming
projects get eslint/tsc/webpack from this package rather than declaring them; config hints are
suppressed, since the config lives here and a consuming project cannot act on them. A project opts
in by adding the script and folding it into check:
"check": "npm run check:lint && npm run check:types && npm run check:dead-code",
"check:dead-code": "echo \"Run check:dead-code\" && `pushwoosh-engine app:command:check-dead-code`"examples/application ships with exactly that wiring, so a project copied from the template gets the
gate on its pre-commit hook from the first commit.
CI is a separate step: the shared frontend/microfrontend-release.yml pipeline runs check:lint and
check:types as their own jobs and never calls npm run check, so the script alone gates the
pre-commit hook only. Blocking a merge needs a check:dead-code job next to those two.
A project whose parcel entry sits outside the globs above (a file no other entry re-exports) needs
its own knip.json in the project root and a plain knip call — the shared config is passed with
--config and cannot be extended per project.
Library commands (reusable packages)
pushwoosh-engine lib:build # TypeScript + Babel compile, copy assets
pushwoosh-engine lib:check-types # Type-check only
pushwoosh-engine lib:command:playground # Dev server for playgroundLocal development
npm ci
# Test with bundled examples:
cd examples/application && npm install && npm start
cd examples/library && npm install && npm startRelease
Releases are triggered by Git tags in CI. Tag with v* for stable, include beta for beta channel.
