Sha256: 7062c36866c94ef60ce578a1c734df530e307cd537bf316c57fa685916a23591
Contents?: true
Size: 1.07 KB
Versions: 6
Compression:
Stored size: 1.07 KB
Contents
/** * Heroku-Patterns - v0.2.0 - 2016 * * , 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
6 entries across 6 versions & 1 rubygems