Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed colors for non term environments

- This applies to the case for single files compressed, not just for generating the combined file.
- Fixed a typo.
  • Loading branch information...
commit bd2ba4e3e33cafd438723d8e1f830587f7485ac9 1 parent 3aab173
Micha J. JohnArcher authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 bin/yuglify
13 bin/yuglify
View
@@ -121,9 +121,14 @@ if (parsed.terminal) {
fs.writeFileSync(compressed, smashed, 'utf8');
- // Those bizarre sets of characters are for coloring the output.
- console.log('Successfully generated ' + extension.slice(1).toUpperCase() + ' file: \u001b[32m' + path.relative(pwd, compressed) + '\033[0m');
-
+ var log = 'Successfully generated ' + extension.slice(1).toUpperCase() + ' file: ';
+ if (hasColor) {
+ // Those bizarre sets of characters are for coloring the output.
+ log += '\u001b[32m' + path.relative(pwd, compressed) + '\033[0m';
+ } else {
+ log += path.relative(pwd, compressed);
+ }
+ console.log(log);
}
});
@@ -137,7 +142,7 @@ if (parsed.terminal) {
var combined;
- // Looping through kown types.
+ // Looping through known types.
known.type.forEach(function( type ) {
if(buffer[type] !== '') {
Please sign in to comment.
Something went wrong with that request. Please try again.