Skip to content

Commit

Permalink
Don’t show warnings about skipped files by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pahen committed Oct 6, 2016
1 parent 9753f9e commit 2cfa8d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## v1.4.1 (Oct 6, 2016)
* Don't show warnings about skipped files by default (enable with --show-skipped).

## v1.4.0 (Oct 6, 2016)
* Show skipped files that can't be resolved as warnings (can be disabled with --no-warning).

Expand Down
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ program
.option('--dot', 'show graph using the DOT language')
.option('--extensions <list>', 'comma separated string of valid file extensions')
.option('--show-extension', 'include file extension in module name', false)
.option('--show-skipped', 'show warning about skipped files', false)
.option('--require-config <file>', 'path to RequireJS config')
.option('--webpack-config <file>', 'path to webpack config')
.option('--no-color', 'disable color in output and image', false)
.option('--no-warning', 'disable warnings', false)
.option('--stdin', 'read predefined tree from STDIN', false)
.option('--debug', 'turn on debug output', false)
.parse(process.argv);
Expand Down Expand Up @@ -154,7 +154,7 @@ new Promise((resolve, reject) => {
return res;
})
.then((res) => {
if (program.warning && !program.json) {
if (program.showSkipped && !program.json) {
output.warnings(res);
}
})
Expand Down
2 changes: 1 addition & 1 deletion lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module.exports.warnings = function (res) {
const skipped = res.warnings().skipped;

if (skipped.length) {
console.log(red.bold('\nSkipped files due to errors:\n'));
console.log(red.bold('\nSkipped files:\n'));

skipped.forEach((file) => {
console.log(red(file));
Expand Down

0 comments on commit 2cfa8d7

Please sign in to comment.