// BUILD_INCLUDE("./scratch/replace01.txt")[text?before=# \u{1F913}\n# \u{1F44C}\n&padleft=#\u2014\u{1F600}\u2014,breakstring?width=50&flags=word]
const bp = new BuildProcess();
const opt = {
match: {
kind: "buildIncludeSlash"
}
};
const results = bp.buildInclude('','./includes/replace.txt', opt);
# π€
# π
#βπβThe quick, brown fox jumps over a lazy dog. DJs flock
#βπβby when MTV ax quiz prog. Junk MTV quiz graced by
#βπβfox whelps.Bawds jog, flick quartz, vex nymphs. Waltz,
#βπβbad nymph, for quick jigs vex! Fox nymphs grab quick-jived
#βπβwaltz. Brick quiz whangs jumpy veldt fox.Bright vixens
#βπβjump; dozy fowl quack. Quick wafting zephyrs vex bold
#βπβJim. Quick zephyrs blow, vexing daft Jim. Sex-charged
#βπβfop blew my junk TV quiz.How quickly daft jumping
#βπβzebras vex. Two driven jocks help fax my big quiz.
#βπβQuick, Baz, get my woven flax jodhpurs! "Now fax quiz
#βπβJack!" my brave ghost pled. Five quacking zephyrs
#βπβjolt my wax bed. Flummoxed by job, kvetching W. zaps
#βπβIraq. Cozy sphinx waves quart jug of bad milk.A very
#βπβbad quack might jinx zippy fowls. Few quips galvanized
#βπβthe mock jury box. Quick brown dogs jump over the
#βπβlazy fox. The jay, pig, fox, zebra, and my wolves
#βπβquack!Blowzy red vixens fight for a quick jump. Joaquin
#βπβPhoenix was gazed by MTV for luck. A wizardβs job
#βπβis to vex chumps quickly in fog. Watch "Jeopardy!
#βπβ", Alex Trebek's fun TV quiz game. Woven silk pyjamas
#βπβexchanged for blue quartz.
Includes replace01.txt and places text before and after output.
[text?before=# \u{1F913}\n# \u{1F44C}\n&padleft=#\u2014\u{1F600}\u2014,breakstring?width=50&flags=word]
The option text
allow for input file content to be manipulated in several ways before being outputed.
{text: { before: "some value" }}
or inlline text?before=some value
Where as some value
can be any string. Some string values require escaping to include as literals.
See: Escaping Parameters
{text: {
padding: {
padleft: 4
}
}
}
inline text?padleft=num
where as num
is any whole number number, pads the left side of each line with a number of spaces
equal to the value of num
.
--or--text?padleft=text
where as text
is a string value, pads the left side of each line with the value of text
.
Spaces at the end of text
are valid. \t (tab) is also acceptable such as text?padleft=\t\t
, would add two tabs as left padding.
If padleft
is a string value then be aware some strings require escaping.
See: Escaping Parameters
{text: { after: "some value" }}
or inlline text?after=some value
Where as some value
can be any string. Some string values require escaping to include as literals.
See: Escaping Parameters
The various options of breakstring
allow for the breaking of lines in different ways.
If the width option of breakstring
is not set then width defaults to 80
.
See: Interface for IOpt.breakstring
{breakstring: { width: 80 }}
or inline breakstring?Width=80
where as 80 is the number of characters to break on, determines that each line will be
broken as close to number characers as possible depending other breakstring
options.
{breakstring: {flag: "word"}}
or inline breakstring?flags=word
Determines that lines are not to be broken on a word.
text?before=# \u{1F913}\n# \u{1F44C}\n&padleft=#\u2014\u{1F600}\u2014
before=# \u{1F913}\n# \u{1F44C}\n
Inserts at the start of the output:
# π€
# π
Note: \n
is used to insert a new line:
Note: unicode characters can be used in text parameters.
padleft=#\u2014\u{1F600}\u2014
Inserts before each line:
#βπβ
{match:{kind: "buildIncludeSlash" }}
// BUILD_INCLUDE(filePath)
// BUILD_INCLUDE(filePath)[options]
// BUILD_INCLUDE(filePath)
[options]
See Also: Class MatchBuildIncludeSlash
Generated using TypeDoc