preview library
Preview orchestration and CLI var parsing.
Functions
-
assertPreviewPathIsFile(
String resolvedFilePath, {FileSystemEntityType resolveEntityType(String path)?}) → void -
Throws when
resolvedFilePathdoes 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=valuepairs 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
filePathunderreferencePathand optionally renders Mason vars. -
resolveReferenceFilePath(
{required String filePath, required String referencePath}) → String -
Resolves
filePathto an absolute path underreferencePath.
Exceptions / Errors
- PreviewException
- Thrown when preview cannot proceed.