Skip to content

Commit d2ff6ea

Browse files
author
New Geoff
committed
most of the rest of the builder JS, reformatted
1 parent 8f27e79 commit d2ff6ea

File tree

6 files changed

+240
-264
lines changed

6 files changed

+240
-264
lines changed

builder/pattern_exporter.js

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,33 @@
88
*
99
*/
1010

11-
(function () {
12-
"use strict";
13-
14-
var fs = require('fs-extra'),
15-
path = require('path');
16-
17-
var pattern_exporter = function(){
18-
19-
function exportPatterns(patternlab){
20-
21-
//read the config export options
22-
var exportKeys = patternlab.config.patternExportKeys;
23-
24-
//find the chosen patterns to export
25-
for (var i = 0; i < exportKeys.length; i++){
26-
for (var j = 0; j < patternlab.patterns.length; j++){
27-
if(exportKeys[i] === patternlab.patterns[j].key){
28-
//write matches to the desired location
29-
fs.outputFileSync(patternlab.config.patternExportDirectory + patternlab.patterns[j].key + '.html', patternlab.patterns[j].patternPartial);
30-
}
11+
"use strict";
12+
13+
var fs = require('fs-extra');
14+
15+
var pattern_exporter = function () {
16+
17+
function exportPatterns(patternlab) {
18+
//read the config export options
19+
var exportKeys = patternlab.config.patternExportKeys;
20+
21+
//find the chosen patterns to export
22+
for (var i = 0; i < exportKeys.length; i++) {
23+
for (var j = 0; j < patternlab.patterns.length; j++) {
24+
if (exportKeys[i] === patternlab.patterns[j].key) {
25+
//write matches to the desired location
26+
fs.outputFileSync(patternlab.config.patternExportDirectory + patternlab.patterns[j].key + '.html', patternlab.patterns[j].patternPartial);
3127
}
3228
}
3329
}
30+
}
3431

35-
return {
36-
export_patterns: function(patternlab){
37-
exportPatterns(patternlab);
38-
}
39-
};
40-
32+
return {
33+
export_patterns: function (patternlab) {
34+
exportPatterns(patternlab);
35+
}
4136
};
4237

43-
module.exports = pattern_exporter;
38+
};
4439

45-
}());
40+
module.exports = pattern_exporter;

0 commit comments

Comments
 (0)