How to use make-dir

Comprehensive make-dir code examples:

How to use make-dir.sync:

154
155
156
157
158
159
160
161
162
163
copyFile(source, dest, header) {
    if (path.isAbsolute(dest)) {
        throw new Error(`Cannot write to absolute path: ${dest}`);
    }
    dest = path.resolve(this.baseDir, dest);
    mkdirp.sync(path.dirname(dest));
    let contents;
    if (header) {
        contents = header + fs.readFileSync(source, 'utf8');
    } else {