preview library

Preview orchestration and CLI var parsing.

Functions

assertPreviewPathIsFile(String resolvedFilePath, {FileSystemEntityType resolveEntityType(String path)?}) → void
Throws when resolvedFilePath does not refer to a readable file.
loadPreviewPartials(Directory targetDir) Map<String, List<int>>
Loads partial files created during annotation resolution.
parsePreviewVars(String? raw) Map<String, dynamic>
Parses key=value pairs from a comma-separated CLI value.
previewReferenceFile({required String filePath, required String referencePath, required ClayConfig config, required bool templateOnly, Map<String, dynamic> vars = const {}}) Future<String>
Transforms filePath under referencePath and optionally renders Mason vars.
resolveReferenceFilePath({required String filePath, required String referencePath}) String
Resolves filePath to an absolute path under referencePath.

Exceptions / Errors

PreviewException
Thrown when preview cannot proceed.