diff --git a/cli.js b/cli.js index 8847dd72..f198000c 100755 --- a/cli.js +++ b/cli.js @@ -26,6 +26,7 @@ var program = require('commander'); var rimraf = promisify(require('rimraf')); var promptly = require('promisified-promptly'); var fs = require('fs'); +var gutil = require('gulp-util'); // The scripts that implement the various commands/tasks we expose. var configure = require('./lib/configure'); @@ -43,7 +44,7 @@ program .action(function(env, options) { configure() .catch(function(err) { - console.error(err); + gutil.log(gutil.colors.red(err)); }); }); @@ -64,7 +65,7 @@ program fs.access('.gitignore', function(err) { if (err) { - console.log('.gh-pages-cache is a temporary repository that we use to push changes to your gh-pages branch. We suggest you add it to your .gitignore.'); + gutil.log('.gh-pages-cache is a temporary repository that we use to push changes to your gh-pages branch. We suggest you add it to your .gitignore.'); return; } @@ -81,7 +82,7 @@ program }); }) .catch(function(err) { - console.error(err); + gutil.log(gutil.colors.red(err)); }); }); @@ -97,7 +98,7 @@ program importScripts: options.importScripts ? options.importScripts.split(',') : null, }) .catch(function(err) { - console.error(err); + gutil.log(gutil.colors.red(err)); }); }); @@ -109,7 +110,7 @@ program rootDir: dir, }) .catch(function(err) { - console.error(err); + gutil.log(gutil.colors.red(err)); }); }); @@ -121,7 +122,7 @@ program dir: dir, }) .catch(function(err) { - console.error(err); + gutil.log(gutil.colors.red(err)); }); }); diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 9711935c..f563959e 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -42,8 +42,8 @@ function gitUrl(dir) { } function templateConfigPrompt(defaultConfig) { - console.log('The current template configuration is:') - console.log(templateConfigToString(defaultConfig)); + gutil.log('The current template configuration is:') + gutil.log(templateConfigToString(defaultConfig)); return promptly.confirm('Would you like to change any of the above configuration values?').then(function(fillInConfig) { if (!fillInConfig) { diff --git a/lib/integrate.js b/lib/integrate.js index 47b7aa67..069368af 100644 --- a/lib/integrate.js +++ b/lib/integrate.js @@ -29,7 +29,7 @@ function copyFile(src, dest) { srcStream.on('error', reject); srcStream.on('end', function() { - console.log(gutil.colors.blue( + gutil.log(gutil.colors.blue( 'Your app needs to load the script offline-manager.js in order to register the service\n' + 'worker that offlines your app. To load the script, add this line to your app\'s HTML\n' + 'page(s)/template(s):\n\n' +