Sha256: ade9d429a1d4bcf1ed67527636c375baada8a245732ce1e62c551e498d7d1e0f
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
/** * Heroku-Patterns - v0.2.0 - 2017 * * , and the web community. * Licensed under the license. * * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. * **/(function () { "use strict"; var fs = require('fs-extra'), path = require('path'); var pattern_exporter = function(){ function exportPatterns(patternlab){ //read the config export options var exportKeys = patternlab.config.patternExportKeys; //find the chosen patterns to export for (var i = 0; i < exportKeys.length; i++){ for (var j = 0; j < patternlab.patterns.length; j++){ if(exportKeys[i] === patternlab.patterns[j].key){ //write matches to the desired location fs.outputFileSync(patternlab.config.patternExportDirectory + patternlab.patterns[j].key + '.html', patternlab.patterns[j].patternPartial); } } } } return { export_patterns: function(patternlab){ exportPatterns(patternlab); } }; }; module.exports = pattern_exporter; }());
Version data entries
5 entries across 5 versions & 1 rubygems