Creates an instance of public file list and calls super
so YassbBaseDirective assigns the args to the protected properties. Because the name of the js file is known, the only value actually used is fileContents
.
Full config options
Public dir to scan to generate the file list
Directive full string found in the file
File contents there the yassb directive was found
Full path to the file being processed
Generated content produced by the renderer
Lang being processed
Options set in the directive
Renderer to generate the HTML to inject
Array wit the absolute URLs and paths of the files to be passed to the renderer
Regex to match the comments to invoke the directive.
Calls the renderer and sets the response as the generatedContent
.
If there is a fatal error the fileContents are returned untouched.
no renderer
Inits public file list. Aborts if the renderer is not found. Else generates the list and calls the renderer.
init
Lists files at the given folder, searching recursively in sub dirs. Does not rely on ListFiles to avoid an extra forEach
loop. Here, if it finds a file, it immediately adds it to the list.
path to scan. Because this method calls itself recursively, it can be a subdir of startingPath
.
Determines the absolutePath and the absolute URL of the file. Done here instead of delegating this to the renderer to make life easiier for renderers.
the directory where the file was found.
the name of the file.
Sets the base path to scan and the renderer by passing the directiveFullString
to DirectivePropsGetter
.
Generates a list of file found at a given path in the
out
folder and passes it to aRenderer