Expand description
File generation for luxid new and luxid make:model.
Generation is split into planning and writing. A Plan is a pure value —
which files, with what contents, and which lines to insert into existing
ones — so the interesting logic is testable without touching a disk.
Writing never overwrites. A generator that clobbers hand-written code once is a generator nobody runs again.
Structs§
- Insertion
- A line to insert after a marker in an existing file.
- Model
Flags - Which artefacts
make:modelshould produce. - NewFile
- A file to create.
- Plan
Enums§
- Client
- The client framework an Inertia app is built with.
- Dependency
- How the generated app should depend on Luxid.
- Stack
- What kind of application
luxid newproduces.
Constants§
Functions§
- apply
- Insert
lineimmediately abovemarker, matching the marker’s indentation. - field_
attributes - Attributes a user wrote above each field inside the markers.
- make_
model - new_app
- refresh_
fields - Replace the body between the field markers, preserving everything else.
- write
- Write a plan to disk.