Preserves user-authored code across regenerations.
Generators emit a # --- CUSTOM --- marker before the closing end
of every regenerable module. Anything the developer writes below that
marker in the generated file is preserved verbatim when the generator
runs again.
Summary
Functions
The marker string.
Reusable marker block appended by generators. Terminates the module
with end once custom content is merged in.
Merge custom content from an existing file into a newly-generated source. If the existing file does not contain the marker, the new source is returned unchanged.
Merge custom content from disk. Reads path if it exists; otherwise
returns the generated source unchanged.
Functions
The marker string.
Reusable marker block appended by generators. Terminates the module
with end once custom content is merged in.
Merge custom content from an existing file into a newly-generated source. If the existing file does not contain the marker, the new source is returned unchanged.
Merge custom content from disk. Reads path if it exists; otherwise
returns the generated source unchanged.