main
Bridgeable Build
Shared production build CLI for Bridgeable Components source libraries.
The source library should contain author-owned files only:
assets/
components/
sections/
styles/
tokens/
bridgeable.config.json
Build tooling, dependency versions, Vite configuration, manifest generation, and artifact packing live here instead of inside each client component repository.
Commands
Validate a source library:
bridgeable-build validate --source .
Build a production dist directory:
bridgeable-build build --source . --out ./dist
Pack an existing dist directory:
bridgeable-build pack --dist ./dist --out ./bridgeable-components.zip
Build and pack in one CI-style command:
bridgeable-build publish \
--source . \
--out ./dist \
--artifact ./bridgeable-components.zip
Build Contract
The CLI preserves the current Bridgeable Components production contract:
styles/global.cssis bundled as the shared global stylesheet.*.component.jsonfiles undercomponents/andsections/are discovered automatically.- Section CSS and JS are emitted as standalone hashed assets.
- Component CSS is expected to be imported by global CSS or section CSS.
- Component JS is emitted only when it self-registers with
window.initBlock. - Static image, font, and video assets are emitted as hashed files and added to
manifest.json. *.twigand*.component.jsonfiles are copied into the output.- Storybook-only files, fixture data, docs, build config,
node_modules,.git, and previous build output are excluded. - Vite emits
manifest.json, which the WordPress Bridgeable Components plugin uses to resolve hashed asset filenames.
Static asset manifest keys use the original logical path from the source library. For example, assets/logo/logo.svg resolves to a hashed file such as assets/logo/logo.[hash].svg in production.
Description
Languages
JavaScript
100%