tasks/patternprimer.js
function (patternFolder, patterns, cb) {
    getSourceFile(function generatePatterns(content) {
      patterns.forEach(function (file) {
        content += '<hr/>';
        content += '<div class="pattern"><div class="display">';
        content += file.content;
        content += '</div><div class="source"><textarea rows="6" cols="30">';
        content += simpleEscaper(file.content);
        content += '</textarea>';
        content += '<p><a href="/'+ patternFolder + '/' + file.filename +'">' + file.filename + '</a></p>';
        content += '</div></div>';
      });
      content += '</body></html>';
      cb(content);
    });
  }
function (patternFolder, patterns, cb) {
    getSourceFile(function generatePatterns(content) {
      patterns.forEach(function (file) {
        content += '<hr/>';
        content += '<div class="pattern"><div class="display">';
        content += file.content;
        content += '</div><div class="source"><textarea rows="6" cols="30">';
        content += simpleEscaper(file.content);
        content += '</textarea>';
        content += '<p><a href="/'+ patternFolder + '/' + file.filename +'">' + file.filename + '</a></p>';
        content += '</div></div>';
      });
      content += '</body></html>';
      cb(content);
    });
  }
function ( patternFolder , patterns , cb ) { getSourceFile ( function generatePatterns ( content ) { patterns . forEach ( function ( file ) { content += '<hr/>' ; content += '<div class="pattern"><div class="display">' ; content += file . content ; content += '</div><div class="source"><textarea rows="6" cols="30">' ; content += simpleEscaper ( file . content ) ; content += '</textarea>' ; content += '<p><a href="/' + patternFolder + '/' + file . filename + '">' + file . filename + '</a></p>' ; content += '</div></div>' ; } ) ; content += '</body></html>' ; cb ( content ) ; } ) ; }
generates the html output for the patterns
generates the html output for the patterns