FileReplacements mixin

the methods to replace variables and partials in a file

Mixin Applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sectionSetupPattern RegExp
the pattern to find sections (sections) within the content
no setter

Methods

checkForPartials({required String content, required Iterable<Partial> partials}) ContentReplacement
writes the partials to the content
checkForSections(String content, Variable variable) ContentReplacement
checks the content for sections (sections) and replaces them with the variable's value
checkForVariables(String content, Variable variable) ContentReplacement
replaces the variable in the content
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sectionPattern(Variable variable) RegExp
the pattern to find sections within the content
toString() String
A string representation of this object.
inherited
variablePattern(Variable variable) RegExp
the pattern to find variables within the content
writeFile({required String targetPath, required String sourcePath, required Iterable<Variable> variables, required Iterable<Variable> outOfFileVariables, required Iterable<Partial> partials}) FileWriteResult
writes the targetPath content using the sourcePath's content and replacing the variables and partials with their configured values

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

sectionSetUp → const String
the placeholder when replacing sections