Expand description
Combines the full pipeline of tokenizing, parsing, building nodes with IO.
Each of the pipeline’s components are available individually. However this crate’s goal is to provide a simple struct that users can use by only providing sources, templates, variables and function and let the crate handle the rest. Builder is this struct.
§IO
The Target enum specifies where text is read and written to.
- Target::Local corresponds to reading and writing to a string.
- Target::External corresponds to reading and writing to a file.
When a builder is constructed, a path to two directories
sourcesand templatestemplatescan be provided. Files under these directories will automatically be loaded with a Target::External read. Target::Local read files can be added withadd_local_*functions.
§Watching
The builder has a watch function which will automatically re-read any
files under the sources, templates directories and the variables file.
§Variables file
If a variables files is provided to the builder, it will load its contents
as global variables that will be available to all sources and templates.
Additionally, under watch, the builder will listen to changes in that file
and automatically reload its variables and rebuild any sources that depend
on these variables.
§Examples
See the examples directory
Modules§
Structs§
- Builder
- Builder
Options - Builder
Warnings - Specifies under which circumstances the builder should log a warning.