Skip to content

Commit 7bf4e5c

Browse files
committed
chore(): add some log colors
1 parent 61ff94f commit 7bf4e5c

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

lib/cli.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Cli.run = function run(processArgv) {
111111
//run with gulp hooks
112112
return runWithGulp(argv, taskInstance);
113113
} else if (argv.v2) {
114-
log.warn('WARN: No node_modules directory found, do you need to run npm install?');
114+
log.warn('WARN: No node_modules directory found, do you need to run npm install?'.yellow);
115115
}
116116
}
117117
return Q.fcall(taskInstance.run.bind(taskInstance), Cli, argv);
@@ -133,8 +133,8 @@ function runWithGulp(argv, taskInstance){
133133
var gulp = require(path.resolve(process.cwd() + '/node_modules/gulp'));
134134
} catch(e) {
135135
// Empty gulpfile (or one that doesn't require gulp?), and no gulp
136-
log.error('\nGulpfile detected, but gulp is not installed');
137-
log.error('Do you need to run `npm install`?\n');
136+
log.error('\nGulpfile detected, but gulp is not installed'.red);
137+
log.error('Do you need to run `npm install`?\n'.red);
138138
process.exit(1);
139139
}
140140
logEvents(gulp, [beforeHook, afterHook]);
@@ -151,17 +151,17 @@ function runWithGulp(argv, taskInstance){
151151
//if there is no hook task, but it's a v2 app and a command that usually needs a hook
152152
if (e.missingTask && /serve|build|run|emulate|upload/.test(cmdName) && argv.v2) {
153153
var taskName = (cmdName === 'serve') ? 'watch' : 'build';
154-
log.warn('WARN: No \'' + beforeHook + '\' gulp task found!');
154+
log.warn(('WARN: No \'' + beforeHook + '\' gulp task found!').yellow);
155155

156156
//The task exists, but there are no hooks for it
157157
//They have the old config file, so we're safe to yell at them
158158
//With new config, may intentionally not have hooks if running their own build
159159
if (gulp.tasks[taskName] && fs.existsSync('ionic.config.js')) {
160-
log.info('Your gulpfile contains a \'' + taskName + '\' task already! Add:\n')
161-
log.info(' gulp.task(\'' + cmdName + ':before\', [\'' + taskName + '\']);\n');
162-
log.info('to your gulpfile to have Ionic CLI run \'' + taskName + '\' before ' + cmdName + '.\n');
160+
log.info(('Your gulpfile contains a \'' + taskName + '\' task already! Add:\n').cyan)
161+
log.info((' gulp.task(\'' + cmdName + ':before\', [\'' + taskName + '\']);\n').cyan);
162+
log.info(('to your gulpfile to have Ionic CLI run \'' + taskName + '\' before ' + cmdName + '.\n').cyan);
163163
} else {
164-
log.warn('If your app requires a build step, you may want to ensure it runs before ' + cmdName + '.\n');
164+
log.warn(('If your app requires a build step, you may want to ensure it runs before ' + cmdName + '.\n').yellow);
165165
}
166166
}
167167
// Only some commands return promises, so wrap it

lib/ionic/start.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ IonicTask.prototype.run = function run(ionic, argv) {
3838
startingApp = true;
3939
// Grab the app's relative directory name
4040

41-
42-
log.info('\nOne awesome Ionic app coming right up...\n');
43-
4441
if (fs.existsSync(options.targetPath)) {
4542
promptPromise = Start.promptForOverwrite(options.targetPath);
4643
} else {
@@ -51,7 +48,7 @@ IonicTask.prototype.run = function run(ionic, argv) {
5148
.then(function(promptToContinue) {
5249
if (!promptToContinue) {
5350
startingApp = false;
54-
log.info('\nIonic start cancelled by user.\n');
51+
log.info('\nIonic start cancelled by user.');
5552
return;
5653
}
5754
return Start.startApp(options);

0 commit comments

Comments
 (0)