Skip to content

Commit b934043

Browse files
committed
chore(checkConfiguration): Add configuration check for debug levels
1 parent 7f4cba8 commit b934043

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

core/lib/patternlab.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,16 +328,26 @@ function checkConfiguration(patternlab) {
328328
};
329329

330330
if (!patternlab.config.outputFileSuffixes) {
331-
plutils.warning('Configuration Object "outputFileSuffixes" not found, and defaulted to the following:');
331+
plutils.warning('');
332+
plutils.warning('Configuration key [outputFileSuffixes] not found, and defaulted to the following:');
332333
console.log(outputFileSuffixes);
333334
plutils.warning('Since Pattern Lab Node Core 2.3.0 this configuration option is required. Suggest you add it to your patternlab-config.json file.');
334-
console.log();
335+
plutils.warning('');
335336
}
336337
patternlab.config.outputFileSuffixes = _.extend(outputFileSuffixes, patternlab.config.outputFileSuffixes);
337338

338339
if (typeof patternlab.config.paths.source.patternlabFiles === 'string') {
340+
plutils.warning('');
339341
plutils.warning(`Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${patternlab.config.paths.source.patternlabFiles}'`);
340342
plutils.warning('Since Pattern Lab Node Core 3.0.0 this key is an object. Suggest you update this key following this issue: https://github.com/pattern-lab/patternlab-node/issues/683.');
343+
plutils.warning('');
344+
}
345+
346+
if (typeof patternlab.config.debug === 'boolean') {
347+
plutils.warning('');
348+
plutils.warning(`Configuration key [debug] inside patternlab-config.json was found as a boolean. As of Pattern Lab Node Core 3.0.0 this key is a string with possible values ['debug', 'info', 'warning', 'error', 'quiet'].`);
349+
plutils.warning(`Turning on 'info', 'warning', and 'error' levels by default`);
350+
plutils.warning('');
341351
}
342352

343353
}

0 commit comments

Comments
 (0)