Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Add some color with chalk
Browse files Browse the repository at this point in the history
  • Loading branch information
mach6 committed Dec 15, 2016
1 parent 6eae20f commit 43ffe3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"dependencies": {
"google-closure-compiler-js": "^20161201.0.0",
"node-minify": "^2.0.2",
"bluebird": "^3.4.6"
"bluebird": "^3.4.6",
"chalk": "^1.1.1"
},
"devDependencies": {
"grunt": "^1.0.0",
Expand Down
5 changes: 3 additions & 2 deletions tasks/node-minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'use strict';
var compressor = require ('node-minify');
var Promise = require ('bluebird');
var chalk = require('chalk');

module.exports = function(grunt) {
grunt.registerMultiTask('node-minify', 'Grunt plugin for node_minify', function() {
Expand Down Expand Up @@ -65,11 +66,11 @@ module.exports = function(grunt) {

minify.then(function (result) {
if (result === 'success' && grunt.file.exists(file.dest)) {
grunt.log.ok('File "' + file.dest + '" created.');
grunt.log.ok('File ' + chalk.cyan(file.dest) + ' created.');
done();
}
}, function (result) {
grunt.log.warn('Failed to create file "' + file.dest + '" due to ' + result + '.');
grunt.log.warn('Failed to create file ' + chalk.yellow(file.dest) + ' due to ' + result + '.');
done(false);
});

Expand Down

0 comments on commit 43ffe3d

Please sign in to comment.