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 thecontent
-
checkForSections(
String content, Variable variable) → ContentReplacement -
checks the
content
for sections (sections) and replaces them with thevariable
's value -
checkForVariables(
String content, Variable variable) → ContentReplacement -
replaces the
variable
in thecontent
-
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 thesourcePath
's content and replacing thevariables
andpartials
with their configured values
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- sectionSetUp → const String
- the placeholder when replacing sections