|
77 | 77 | }
|
78 | 78 |
|
79 | 79 | // skip non-pattern files
|
80 |
| - if (!patternEngines.isPatternFile(filename, patternlab)) { return; } |
| 80 | + if (!patternEngines.isPatternFile(filename, patternlab)) { return null; } |
81 | 81 | if (config.debug) {
|
82 | 82 | console.log('processPatternIterative:', 'found pattern', file);
|
83 | 83 | }
|
|
92 | 92 | //the object in the next diveSync
|
93 | 93 | addPattern(currentPattern, patternlab);
|
94 | 94 | //no need to process further
|
95 |
| - return; |
| 95 | + return currentPattern; |
96 | 96 | }
|
97 | 97 |
|
98 |
| - //can ignore all non-mustache files at this point |
99 |
| - if(ext !== '.mustache'){ |
| 98 | + //can ignore all non-supported files at this point |
| 99 | + if(patternEngines.isFileExtensionSupported(ext) === false){ |
100 | 100 | if (config.debug) {
|
101 | 101 | console.log('==================== FOUND NON-MUSTACHE FILE');
|
102 | 102 | }
|
103 |
| - return; |
| 103 | + return currentPattern; |
104 | 104 | }
|
105 | 105 |
|
106 | 106 | //see if this file has a state
|
|
140 | 140 |
|
141 | 141 | //add currentPattern to patternlab.patterns array
|
142 | 142 | addPattern(currentPattern, patternlab);
|
| 143 | + |
| 144 | + return currentPattern; |
143 | 145 | }
|
144 | 146 |
|
145 | 147 |
|
|
297 | 299 | return renderPattern(template, data, partials);
|
298 | 300 | },
|
299 | 301 | process_pattern_iterative: function(file, patternlab){
|
300 |
| - processPatternIterative(file, patternlab); |
| 302 | + return processPatternIterative(file, patternlab); |
301 | 303 | },
|
302 | 304 | process_pattern_recursive: function(file, patternlab, additionalData){
|
303 | 305 | processPatternRecursive(file, patternlab, additionalData);
|
|
0 commit comments