tasks/patternprimer.js
function (patternFolder, files, cb) {
    var file, patterns = [];
    files.forEach(function readPattern(pattern) {
      file = {filename: pattern};
      file.content = grunt.file.read(patternFolder + '/' + file.filename);
      patterns.push(file);
    });

    // call the outputPatterns function that generates
    // the html for every pattern
    outputPatterns(patternFolder, patterns, cb);
  }
function (patternFolder, files, cb) {
    var file, patterns = [];
    files.forEach(function readPattern(pattern) {
      file = {filename: pattern};
      file.content = grunt.file.read(patternFolder + '/' + file.filename);
      patterns.push(file);
    });

    // call the outputPatterns function that generates
    // the html for every pattern
    outputPatterns(patternFolder, patterns, cb);
  }
function ( patternFolder , files , cb ) { var file , patterns = [ ] ; files . forEach ( function readPattern ( pattern ) { file = { filename : pattern } ; file . content = grunt . file . read ( patternFolder + '/' + file . filename ) ; patterns . push ( file ) ; } ) ; // call the outputPatterns function that generates // the html for every pattern outputPatterns ( patternFolder , patterns , cb ) ; }
walks through the pattern folder reads all the contents of the pattern files
walks through the pattern folder reads all the contents of the pattern files