lib/generator.js
function extractFixturesData( data ) {
    return Promise.map( data.section(), function( section ) {
      var markup  = section.markup();
      var ext     = path.extname( markup );
      var testDir = data.data.files[0].split("/")
            .filter(function(dir, i) {
              return i <= 2;
            })
            .concat([path.dirname( markup ), (path.basename( markup, ext ) + ext) ])
            .join('/');
  
      return Promise.props({
        header : section.header(),
        description : section.description(),
        markup : fs.readFileAsync( testDir, 'utf8' ).then( mustache.render ),
        name : path.basename( section.markup(), path.extname( section.markup() ) )
      });
   });
  }
function extractFixturesData( data ) {
    return Promise.map( data.section(), function( section ) {
      var markup  = section.markup();
      var ext     = path.extname( markup );
      var testDir = data.data.files[0].split("/")
            .filter(function(dir, i) {
              return i <= 2;
            })
            .concat([path.dirname( markup ), (path.basename( markup, ext ) + ext) ])
            .join('/');
  
      return Promise.props({
        header : section.header(),
        description : section.description(),
        markup : fs.readFileAsync( testDir, 'utf8' ).then( mustache.render ),
        name : path.basename( section.markup(), path.extname( section.markup() ) )
      });
   });
  }
function extractFixturesData ( data ) { return Promise . map ( data . section ( ) , function ( section ) { var markup = section . markup ( ) ; var ext = path . extname ( markup ) ; var testDir = data . data . files [ 0 ] . split ( "/" ) . filter ( function ( dir , i ) { return i <= 2 ; } ) . concat ( [ path . dirname ( markup ) , ( path . basename ( markup , ext ) + ext ) ] ) . join ( '/' ) ; return Promise . props ( { header : section . header ( ) , description : section . description ( ) , markup : fs . readFileAsync ( testDir , 'utf8' ) . then ( mustache . render ) , name : path . basename ( section . markup ( ) , path . extname ( section . markup ( ) ) ) } ) ; } ) ; }
Builds an object out of KSS meta data that can be used to populate a template.

@param {object} - kss meta data object
@returns {Promise.array} array of fixture data that can be used to populate a template.
Builds an object out of KSS meta data that can be used to populate a template .