Skip to content

Commit

Permalink
better console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
josias-r committed Sep 21, 2019
1 parent b374472 commit dc10e6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@josias-r/wpds-scripts",
"version": "2.1.1",
"version": "2.1.2",
"description": "WordPress Dev Server scripts",
"bin": {
"wpds-scripts": "./bin/wpds-scripts.js"
Expand Down
8 changes: 4 additions & 4 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ webpack(config, (err, stats) => {
return;
}
const info = stats.toJson();
if (stats.hasErrors()) {
console.error(chalk.red(info.errors));
status = chalk.red.bold("with errors.");
}
if (stats.hasWarnings()) {
console.warn(chalk.yellow(info.warnings));
status = chalk.yellow.bold("with warnings.");
}
if (stats.hasErrors()) {
console.error(chalk.red(info.errors));
status = chalk.red.bold("with errors.");
}
console.log(logPrefix, chalk.green("Wepack build has finished"), status);
});

0 comments on commit dc10e6a

Please sign in to comment.