function writeFile(output, filePath, content) {
    var rootFolder = output.getRoot();
    filePath = path.join(rootFolder, filePath);

    return fs.ensureFile(filePath)
    .then(function() {
        return fs.writeFile(filePath, content);
    })
    .thenResolve(output);
}
function writeFile(output, filePath, content) {
    var rootFolder = output.getRoot();
    filePath = path.join(rootFolder, filePath);

    return fs.ensureFile(filePath)
    .then(function() {
        return fs.writeFile(filePath, content);
    })
    .thenResolve(output);
}
function writeFile ( output , filePath , content ) { var rootFolder = output . getRoot ( ) ; filePath = path . join ( rootFolder , filePath ) ; return fs . ensureFile ( filePath ) . then ( function ( ) { return fs . writeFile ( filePath , content ) ; } ) . thenResolve ( output ) ; }
Write a file to the output folder

@param {Output} output
@param {String} filePath
@param {Buffer|String} content
@return {Promise}
Write a file to the output folder
Write a file to the specified output folder