lib/api/encodeGlobal.js
function(fileName, content) {
                return Promise()
                .then(function() {
                    var filePath = PathUtils.resolveInRoot(outputFolder, fileName);

                    return fs.ensureFile(filePath)
                    .then(function() {
                        return fs.writeFile(filePath, content);
                    });
                });
            }
function(fileName, content) {
                return Promise()
                .then(function() {
                    var filePath = PathUtils.resolveInRoot(outputFolder, fileName);

                    return fs.ensureFile(filePath)
                    .then(function() {
                        return fs.writeFile(filePath, content);
                    });
                });
            }
function ( fileName , content ) { return Promise ( ) . then ( function ( ) { var filePath = PathUtils . resolveInRoot ( outputFolder , fileName ) ; return fs . ensureFile ( filePath ) . then ( function ( ) { return fs . writeFile ( filePath , content ) ; } ) ; } ) ; }
Write a file to the output folder,
It creates the required folder

@param {String} fileName
@param {Buffer} content
@return {Promise}
Write a file to the output folder It creates the required folder