the template to add partials to.
the list of partials to add.
Add Rollback Adds a rollback to the collection.
the id of the rollback to add.
the rollback object.
Configure Configures template for output.
the name of the template to load.
the output name/path to use when rendering.
the optional config for the template.
Get Dirs Takes a base directory then retrives all sub directories for that directory.
base directory to get all sub directories from.
Get Partial
the partial to get.
Show Rollbacks Shows details/stats for recoreded rollbacks.
Has Matter Tests if string contains front matter.
the string to inspect.
Has Template Loosly check if string contains template chars.
the string to inspect.
Init Initializes Mustr for current project
when true forces init.
Inject Creates a file stream reading chunks until match. Upon match the provided value is injected. NOTE: lines are auto updated with the correct line ending for returns.
the file name to inject into.
the string or expression to match.
insert on before, after, replace, first or last when matched.
the value or callback for injecting upon match.
the callback on file written.
Load Loads the template paths and config.
Load Rollbacks Loads the rollbacks config file.
Normalize Parses/normalizes a template name, path or static template string. When passing a name it searches loaded template paths and matches the filename to the template name passed.
the template name, path or static template string.
Normalize Name Removes extention from template name.
the template name to normalize.
Normalize Extension Ensures extension begins with "."
the extension to be normalized.
Register Registers a template with Mustr.
to use when registering a template.
the template name or path to lookup or a static string.
the template front matter which overrides static properties.
Register Component Registers a group of templates which will output to the specified directory. Often a component may have several files such as styles helpers, interfaces or maybe actions for react. This makes it easy to output all the files needed at once, hence a "component" or group.
the name of the component regsiter.
array of template names or csv params.
Register Group Just a patch for backward compatibility.
arguments for registerComponent.
Reindex Rollbacks Iterates rollbacks.json re-sorts order optionally prunes records where rollback files are missing.
when true prunes entries where missing required rollback folder/files.
Remove Rollbacks Removes previous rollbacks before Date by Date string a count of rollbacks to be removed or by rollbackId. When a number is provided the first of number provided will be removed. The last rollback is always preserved.
the date string or number of rollbacks to remove.
when false changes are not saved to file.
Render Renders the requested template.
the name of the template to render.
the output path/name to render the template as.
the configuration and metadata object.
forces overwriting existing file.
Node style callback with err and rendered template.
private variable used only internally.
Rollback Rolls back and removes generated templates.
NOTE: currently does not rollback injects.
the template or group name.
Save Rollbacks Writes current rollbacks to file.
when false prevents pruning rollbacks before save.
Set Engine Allows for setting the templating Engine that should be used for rendering.
the template Engine used for rendering.
the rendering method.
Transform To Transforms a string to the desired casing.
the string to be transformed.
the casing to be transformed to using lodash.
Truncate Nothing special, cheesy truncation...move along.
the string to be truncated.
the max len before truncating.
Try Require Tries to require a module logging error if failed.
the module path to be required.
Generated using TypeDoc
Add Partials