lib/generator.js
function saveFixture( name, data, directory ) {
    return fs.readFileAsync( template, 'utf8' )
      .then( function renderTemplate( template ) {
        return mustache.render( template, { stylesheets: stylesheets, sections: data } );
      }).then( function saveTemplate( templateData ) {
        return fs.outputFileAsync( destination + '/' + name + '.html', templateData );
      });
  }
function saveFixture( name, data, directory ) {
    return fs.readFileAsync( template, 'utf8' )
      .then( function renderTemplate( template ) {
        return mustache.render( template, { stylesheets: stylesheets, sections: data } );
      }).then( function saveTemplate( templateData ) {
        return fs.outputFileAsync( destination + '/' + name + '.html', templateData );
      });
  }
function saveFixture ( name , data , directory ) { return fs . readFileAsync ( template , 'utf8' ) . then ( function renderTemplate ( template ) { return mustache . render ( template , { stylesheets : stylesheets , sections : data } ) ; } ) . then ( function saveTemplate ( templateData ) { return fs . outputFileAsync ( destination + '/' + name + '.html' , templateData ) ; } ) ; }
Populates a template and saves it as a fixture file.

@param {object} name - the name of the data sections.
@param {array} data  - template data array.
@param {string} directory - parent directory to save the fixture to.
@returns {Promise}
Populates a template and saves it as a fixture file .