Recursive directory walker for Angular/TypeScript projects. Filters source files, extracts inline templates, and loads external templates.

Methods

(inner) collectFiles(dir, excludedFoldersopt) → {Promise.<Array.<string>>}

Collects all .ts/.html files recursively, excluding test files

Parameters:
NameTypeAttributesDescription
dirstring
excludedFoldersArray.<string><optional>
Returns:
Type: 
Promise.<Array.<string>>

(inner) getFileContent(filePath, processedTemplates, verboseopt) → {FileContent|null}

Extracts template and TypeScript content from a file

Parameters:
NameTypeAttributesDefaultDescription
filePathstring
processedTemplatesSet.<string>

Tracks processed templates to avoid duplicates

verboseboolean<optional>
false
Returns:
Type: 
FileContent | null