64926003107c2673f4cdc9a3845e0b85b8f17a45
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. *.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.
Description
Languages
JavaScript
100%