Class: Lilac::CLI::BuildContext
- Inherits:
-
Struct
- Object
- Struct
- Lilac::CLI::BuildContext
- Defined in:
- lib/lilac/cli/build/build_context.rb
Overview
Per-build shared state handed from Builder (orchestrator) to
PageCompiler (per-page compiler). All fields are set before the
page loop starts, so PageCompiler treats the struct as read-only;
the cache / linter references inside it accumulate per-page state
via their own APIs.
Fields:
- `components` — { name => SFC::Component }, .lil + synthesized
- `bundle_assets` — BundleAssetWriter::BundleAssets or nil (:inline mode)
- `package_dist_urls` — Array<String> page-relative URLs for `.mrb` packages
- `template_cache` — shared TemplateASTCache (parse once, reuse)
- `build_linter` — BuildLinter accumulating cross-page diagnostics
- `bytecode_builder` — BytecodeBuilder for compiled-target `.mrb` emission
- `target` — :full | :compiled
- `delivery` — :inline | :bundle
- `live_reload` — boolean (dev path injects SSE client script)
- `output_dir` — absolute dist path (relative refs in boot module need this)
- `pages_dir` — absolute pages root (for computing output paths)
Instance Attribute Summary collapse
-
#build_linter ⇒ Object
Returns the value of attribute build_linter.
-
#bundle_assets ⇒ Object
Returns the value of attribute bundle_assets.
-
#bytecode_builder ⇒ Object
Returns the value of attribute bytecode_builder.
-
#components ⇒ Object
Returns the value of attribute components.
-
#delivery ⇒ Object
Returns the value of attribute delivery.
-
#live_reload ⇒ Object
Returns the value of attribute live_reload.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#package_dist_urls ⇒ Object
Returns the value of attribute package_dist_urls.
-
#pages_dir ⇒ Object
Returns the value of attribute pages_dir.
-
#target ⇒ Object
Returns the value of attribute target.
-
#template_cache ⇒ Object
Returns the value of attribute template_cache.
Instance Attribute Details
#build_linter ⇒ Object
Returns the value of attribute build_linter
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def build_linter @build_linter end |
#bundle_assets ⇒ Object
Returns the value of attribute bundle_assets
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def bundle_assets @bundle_assets end |
#bytecode_builder ⇒ Object
Returns the value of attribute bytecode_builder
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def bytecode_builder @bytecode_builder end |
#components ⇒ Object
Returns the value of attribute components
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def components @components end |
#delivery ⇒ Object
Returns the value of attribute delivery
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def delivery @delivery end |
#live_reload ⇒ Object
Returns the value of attribute live_reload
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def live_reload @live_reload end |
#output_dir ⇒ Object
Returns the value of attribute output_dir
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def output_dir @output_dir end |
#package_dist_urls ⇒ Object
Returns the value of attribute package_dist_urls
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def package_dist_urls @package_dist_urls end |
#pages_dir ⇒ Object
Returns the value of attribute pages_dir
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def pages_dir @pages_dir end |
#target ⇒ Object
Returns the value of attribute target
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def target @target end |
#template_cache ⇒ Object
Returns the value of attribute template_cache
23 24 25 |
# File 'lib/lilac/cli/build/build_context.rb', line 23 def template_cache @template_cache end |