@bedrock-core/ui-compiler
v0.1.2
Published
Compiles a solved @bedrock-core/ui tree into static JSON UI
Downloads
520
Maintainers
Readme
@bedrock-core/ui-compiler
Compiles a solved @bedrock-core/ui tree — a *.screen.tsx
default export — into static JSON UI: faces, the per-host placement, and the document each control
lands in. This is the low-level compiler; addon authors reach it through the ui-compiler Regolith
filter, which runs it over every screen in a project and writes the result into the addon's own
resource pack. Reach for the package directly only when writing a build tool of your own.
Install
yarn add @bedrock-core/ui-compilerUsage
import { compileScreen } from '@bedrock-core/ui-compiler';
import Furnace from './furnace.screen';
const compiled = compileScreen(Furnace, { name: 'furnace', namespace: 'core' });Documentation
https://bedrock-core.drav.dev/docs/ui/compiler
