run
Runs the entire pipeline, including scanning the directory for localization files, compiling the locales, and emitting the results to the file system.
run(options: RunnerOptions): Promise\<Stats[]\>
Receive the options RunnerOptions
object with the following properties:
outputPath
- The path to the directory where the files will be written.inputPath
[optional] - The path to the directory to scan.matcher
[optional] - The Matcher to use for filtering files. This can be aRegExp
or afunction
that receives a file path and returns a boolean. The default value is/.+\.locale\.json/
.merge
[optional] - A boolean value indicating whether to merge namespaces from different files. The default value isfalse
.clear
[optional] - A boolean value indicating whether to clear the output directory before writing files. The default value isfalse
.recursive
[optional] - A boolean value indicating whether to scan subdirectories recursively. The default value istrue
.parser
[optional] - The Parser object to use for parsing the files.
The function returns a promise that resolves to an array of Stats objects