compiler/

directory
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT

Directories

Path Synopsis
cmd
puzzle command
pzlc command
Command pzlc is a minimal single-file .pzl compiler used by the integration tests described in constellation/doc/DOC-TESTING.md.
Command pzlc is a minimal single-file .pzl compiler used by the integration tests described in constellation/doc/DOC-TESTING.md.
internal
build
Package build drives a full `puzzle build` (constellation/doc/DOC-COMPILER-DESIGN.md §b): one esbuild api.Build pass over app/app.js with the .pzl plugin registered, then the collected global CSS and the static public/ assets are written next to the bundle.
Package build drives a full `puzzle build` (constellation/doc/DOC-COMPILER-DESIGN.md §b): one esbuild api.Build pass over app/app.js with the .pzl plugin registered, then the collected global CSS and the static public/ assets are written next to the bundle.
codegen
Package codegen turns a parsed .pzl template (constellation/doc/DOC-COMPILER-DESIGN.md §c) into the generated JS module — the user's <script> emitted VERBATIM plus an injected runtime import and an appended `Name.prototype.render = function () {…}` (constellation/doc/DOC-COMPILER-DESIGN.md §d, constellation/doc/DOC-APP-ANATOMY.md §1).
Package codegen turns a parsed .pzl template (constellation/doc/DOC-COMPILER-DESIGN.md §c) into the generated JS module — the user's <script> emitted VERBATIM plus an injected runtime import and an appended `Name.prototype.render = function () {…}` (constellation/doc/DOC-COMPILER-DESIGN.md §d, constellation/doc/DOC-APP-ANATOMY.md §1).
config
Package config loads puzzle.config.js — the app's optional configuration file (constellation/doc/DOC-DECISIONS.md D12).
Package config loads puzzle.config.js — the app's optional configuration file (constellation/doc/DOC-DECISIONS.md D12).
dev
Package dev implements `puzzle dev`: an initial development build, a recursive fsnotify watch of the app's source tree, a debounced rebuild loop, a static file server for dist/ with history-API fallback, and SSE-based live reload.
Package dev implements `puzzle dev`: an initial development build, a recursive fsnotify watch of the app's source tree, a debounced rebuild loop, a static file server for dist/ with history-API fallback, and SSE-based live reload.
fsutil
Package fsutil holds small filesystem helpers shared across the compiler.
Package fsutil holds small filesystem helpers shared across the compiler.
generate
Package generate scaffolds Puzzle source files — components, views, layouts, and models — from frozen-grammar stub templates (constellation/doc/DOC-SPEC.md §6, §7, §11).
Package generate scaffolds Puzzle source files — components, views, layouts, and models — from frozen-grammar stub templates (constellation/doc/DOC-SPEC.md §6, §7, §11).
jsident
Package jsident owns JavaScript identifier rules shared by the parser and code generator.
Package jsident owns JavaScript identifier rules shared by the parser and code generator.
keys
Package keys implements the portable, TTY-agnostic half of the "press q to quit" affordance shared by `puzzle dev` and `puzzle preview`.
Package keys implements the portable, TTY-agnostic half of the "press q to quit" affordance shared by `puzzle dev` and `puzzle preview`.
pieces
Package pieces implements `puzzle add piece <name…>`: copying copy-in UI components ("pieces") out of a registry into a Puzzle app.
Package pieces implements `puzzle add piece <name…>`: copying copy-in UI components ("pieces") out of a registry into a Puzzle app.
plugin
Package plugin implements the esbuild onLoad plugin for *.pzl files (constellation/doc/DOC-COMPILER-DESIGN.md §b).
Package plugin implements the esbuild onLoad plugin for *.pzl files (constellation/doc/DOC-COMPILER-DESIGN.md §b).
preview
Package preview implements `puzzle preview`: a local server for an ALREADY BUILT dist/, behaving the way the host that will serve it behaves.
Package preview implements `puzzle preview`: a local server for an ALREADY BUILT dist/, behaving the way the host that will serve it behaves.
scaffold
Package scaffold generates a new Puzzle application from an embedded template tree (see templates/).
Package scaffold generates a new Puzzle application from an embedded template tree (see templates/).
serve
Package serve holds the two pieces of HTTP plumbing `puzzle dev` and `puzzle preview` must agree on: the loopback port scan (D90) and the mode-aware mapping from a request path onto a built dist/ tree.
Package serve holds the two pieces of HTTP plumbing `puzzle dev` and `puzzle preview` must agree on: the loopback port scan (D90) and the mode-aware mapping from a request path onto a built dist/ tree.
styles
Package styles owns the CSS side of a build: running the Tailwind pipeline (constellation/doc/DOC-DECISIONS.md D12/D26) and composing the final dist/styles.css.
Package styles owns the CSS side of a build: running the Tailwind pipeline (constellation/doc/DOC-DECISIONS.md D12/D26) and composing the final dist/styles.css.
textutil
Package textutil holds small text helpers shared across compiler packages.
Package textutil holds small text helpers shared across compiler packages.
ui
Package ui contains small terminal-formatting helpers for the compiler CLI.
Package ui contains small terminal-formatting helpers for the compiler CLI.
update
Package update checks the npm registry for newer Puzzle CLI releases and caches the result for passive notifications.
Package update checks the npm registry for newer Puzzle CLI releases and caches the result for passive notifications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL