Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit a85b1cf

Browse files
committed
get rid of debug logging; add addOutputFiles() hook
1 parent b777658 commit a85b1cf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/engine_react.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,26 @@ var engine_react = {
123123
},
124124

125125
rawTemplateCodeFormatter(unformattedString) {
126-
console.log('rawTemplateCodeFormatter()');
127126
return beautify(unformattedString, {e4x: true, indent_size: 2});
128127
},
129128

130129
renderedCodeFormatter(unformattedString) {
131-
console.log('renderedCodeFormatter()');
132130
return unformattedString;
133131
},
134132

135133
markupOnlyCodeFormatter(unformattedString, pattern) {
136134
const $ = cheerio.load(unformattedString);
137-
console.log('markupOnlyCodeFormatter()');
138135
return beautify.html($('.reactPatternContainer').html(), {indent_size: 2});
136+
},
137+
138+
/**
139+
* Add custom output files to the pattern output
140+
* @param {object} patternlab - the global state object
141+
* @returns {(object|object[])} - an object or array of objects,
142+
* each with two properties: path, and content
143+
*/
144+
addOutputFiles(paths, patternlab) {
145+
return [];
139146
}
140147
};
141148

0 commit comments

Comments
 (0)