Skip to content

Commit d729e4c

Browse files
committed
feat(debug): Remove printDebug entirely
1 parent e33eef8 commit d729e4c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

core/lib/patternlab.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -489,29 +489,6 @@ const patternlab_engine = function (config) {
489489
console.log('===============================');
490490
}
491491

492-
function printDebug() {
493-
// A replacer function to pass to stringify below; this is here to prevent
494-
// the debug output from blowing up into a massive fireball of circular
495-
// references. This happens specifically with the Handlebars engine. Remove
496-
// if you like 180MB log files.
497-
function propertyStringReplacer(key, value) {
498-
if (key === 'engine' && value && value.engineName) {
499-
return '{' + value.engineName + ' engine object}';
500-
}
501-
return value;
502-
}
503-
504-
// GTP: this commented out now on the advice of Brian, because we think nobody looks at it,
505-
// and it causes problems.
506-
//debug file can be written by setting flag on patternlab-config.json
507-
// if (patternlab.config.debug) {
508-
// console.log('writing patternlab debug file to ./patternlab.json');
509-
// fs.outputFileSync('./patternlab.json', JSON.stringify(patternlab, propertyStringReplacer, 3));
510-
// }
511-
}
512-
513-
514-
515492
function renderSinglePattern(pattern, head) {
516493
// Pattern does not need to be built and recompiled more than once
517494
if (!pattern.isPattern || pattern.compileState === CompileState.CLEAN) {
@@ -813,7 +790,6 @@ const patternlab_engine = function (config) {
813790
return Promise.resolve();
814791
});
815792

816-
printDebug();
817793
patternlab.isBusy = false;
818794
callback();
819795
});
@@ -842,7 +818,6 @@ const patternlab_engine = function (config) {
842818
}
843819
patternlab.isBusy = true;
844820
return buildPatterns(options.cleanPublic).then(() => {
845-
printDebug();
846821
patternlab.isBusy = false;
847822
callback();
848823
});

0 commit comments

Comments
 (0)