Skip to content

Commit

Permalink
[CHORE] add colors for error messages (add chalk plugin)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmh committed Jun 16, 2016
1 parent 295ff2c commit c2c493e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions grunt/shell.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const chalk = require('chalk');

function isMaster(err, stdout, stderr, cb) {
if (err) {
cb(err);
Expand All @@ -9,8 +11,9 @@ function isMaster(err, stdout, stderr, cb) {
cb();
return;
} else {
console.log('You are not at master brunch!');
console.log('Please switch to master branch and start script again.');
console.log(chalk.red('Error!'));
console.log(chalk.red('You are not at master brunch!'));
console.log(chalk.yellow('Please switch to master branch and start script again.'));
cb();
process.exit();
}
Expand All @@ -27,9 +30,9 @@ function isUpdated(err, stdout, stderr, cb) {
cb();
return;
} else {
console.log('Error!');
console.log('Your local master branch is not synchronized with remote master.');
console.log('Please push you changes to remote repo (git push), and start script again.');
console.log(chalk.red('Error!'));
console.log(chalk.red('Your local master branch is not synchronized with remote master.'));
console.log(chalk.yellow('Please push you changes to remote repo ') + chalk.blue('[git push]') + chalk.yellow(', and start script again.'));
cb();
process.exit();
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"repository": "t3kit/felayout_bluemountain",
"devDependencies": {
"autoprefixer": "6.3.1",
"chalk": "1.1.3",
"grunt": "0.4.5",
"grunt-assemble": "0.4.0",
"grunt-build-control": "0.6.2",
Expand Down

0 comments on commit c2c493e

Please sign in to comment.