@peripheries/engine
v0.20.0
Published
Build, check, knowledge and deploy for peripheries component repos
Readme
@peripheries/engine
Build, check, catalog knowledge and deploy for peripheries component repos:
one engine CLI, driven by engine.config.ts in the repo.
import { defineConfig } from '@peripheries/engine'
export default defineConfig({
org: '<org-slug>',
lineages: ['main', { name: '<form-lineage>', kind: 'form' }, '<page-lineage>'],
})engine deploy [--develop|--prod] [--lineage <name>] [--skip-build]
engine upload | register | cutover | knowledge | contracts
engine bundle-size | check-bundle-leak | validate-externalsStatic assets
Images and fonts a lineage's components import (import url from
'./photo.jpg', new URL('./photo.jpg', import.meta.url), CSS
url(./font.woff2)) ship as files, not data: URIs. engine build emits them
into the lineage's assets/ with content-hashed names, referenced relative to
index.js and index.css, and engine upload uploads them beside
index.js.
Only these may ship, or the build fails naming the file: png, jpg/jpeg,
webp, avif, gif, svg (without <script>, on*= handlers,
javascript: URLs or <foreignObject>), woff2, woff, ttf, otf; 1 MB
per asset and 8 MB per lineage unless assets: { maxAssetBytes, maxTotalBytes }
in the config says otherwise.
SVG assets aren't allowed in public or shared lineages, which upload to
bundles-public: that bucket refuses image/svg+xml. Use PNG or WebP there,
or inline the SVG in a component. Private lineages may ship a clean SVG.
Credentials are read from the environment of the repo that runs it; the package holds none.
