Namespace: templating

templating

Methods

<static> processDirectory(self, source, destination)

Process an entire directory filtering and templating accordingly

Parameters:
Name Type Description
self Object

the generator

source String

the path to the directory to be processed

destination String

the path to where the processed direcory should be written to

Source:

<static> relativePathTo(from, to, strip) → {String}

Returns a relative path used to require the 'to' file in the 'from' file

Parameters:
Name Type Description
from String

file path to the from file

to String

file path to the to file

strip Boolean

whether to strip the index file name and/or the js ext

Source:
Returns:
  • relative path to be used in require statements
Type
String

<static> rewrite(args) → {String}

Rewrite a body of text

Parameters:
Name Type Description
args Object

rewrite arguments

Source:
Returns:
  • the rewritten body of text
Type
String

<static> rewriteFile(args)

Rewrite a single file in place

Parameters:
Name Type Description
args Object

rewrite arguments, file, and path

Source: