Merges directories together
Motivation
- Used in mesh.
- Bootstrapping libraries
Example
var dirmr = fs = mu = tplData = {}; //read the bootstrap directory for the target dirs //filter through template files, and fill them - examples are: .mu.html, .ejs.html, .mu.json //copy all the files to the library directory //called after all files have been copied;
API
.dirmr([dirs])
;
.join(directory)
Joins (merges) the target directories to the output folder
.readdir(directory, filter)
Scans the given directory for dirs to merge
;
.copyEach(outputDir)
Copies target directories to output directory without merging
.sort(fn)
Sorts the directories
.filterFile(search, fn)
Filters files before they're copied
;
.complete(callback)
Called once the operations are complete
exports.mergeJSON(repl, obj)
merges JSON files as they're copied to the target directory
;
exports.parseTemplate(data)
Searches for template files, and replaces content with the data given. supported templates: mu, ejs
;