write method
writes the partial to the target file
Implementation
@override
FileWriteResult write({
required Iterable<Partial> partials,
required Set<Variable> outOfFileVariables,
}) {
try {
return writeFile(
targetPath: p.join(outputDir, toPartialFile()),
sourcePath: sourceFile,
variables: variables,
outOfFileVariables: outOfFileVariables,
partials: partials,
);
} catch (e) {
if (e is ConfigException) {
throw PartialException(
partial: sourceFile,
reason: e.message,
);
}
throw PartialException(
partial: sourceFile,
reason: e.toString(),
);
}
}