lib/fn/output.js
function output(sourceCode, filePath) {
    return new Promise(function (resolve, reject) {
        mkdirp(path.dirname(filePath), function (ioErr) {
            if (ioErr) {
                reject(ioErr);
                throw ioErr;
            }
            fs.writeFile(filePath, sourceCode, function (writeErr) {
                if (writeErr) {
                    reject(writeErr);
                    throw writeErr;
                }
                resolve();
            });
        });
    });
}
function output(sourceCode, filePath) {
    return new Promise(function (resolve, reject) {
        mkdirp(path.dirname(filePath), function (ioErr) {
            if (ioErr) {
                reject(ioErr);
                throw ioErr;
            }
            fs.writeFile(filePath, sourceCode, function (writeErr) {
                if (writeErr) {
                    reject(writeErr);
                    throw writeErr;
                }
                resolve();
            });
        });
    });
}
function output ( sourceCode , filePath ) { return new Promise ( function ( resolve , reject ) { mkdirp ( path . dirname ( filePath ) , function ( ioErr ) { if ( ioErr ) { reject ( ioErr ) ; throw ioErr ; } fs . writeFile ( filePath , sourceCode , function ( writeErr ) { if ( writeErr ) { reject ( writeErr ) ; throw writeErr ; } resolve ( ) ; } ) ; } ) ; } ) ; }
Output file by source code string

@param sourceCode Source code string
@param filePath Destination path and file name
Output file by source code string