Fix gulp-util deprecation

This patchset aims to remove the gulp-util package using the
steps outlined in the deprecation message[1]
[1] https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

Change-Id: I11ed0f56cb3756e395f3684655f4b54e906b6a55
This commit is contained in:
mccasland, trevor (tm2086) 2018-03-19 17:17:57 -05:00 committed by Trevor McCasland
parent 4cc5c7e449
commit 238e3fd135
4 changed files with 10 additions and 8 deletions

View File

@ -3,7 +3,7 @@
var config = require('../config');
var gulp = require('gulp');
var gulpif = require('gulp-if');
var gutil = require('gulp-util');
var log = require('fancy-log');
var source = require('vinyl-source-stream');
var sourcemaps = require('gulp-sourcemaps');
var buffer = require('vinyl-buffer');
@ -49,7 +49,7 @@ function buildScript(file) {
var stream = bundler.bundle();
var createSourcemap = config.browserify.sourcemap;
gutil.log('Rebundle...');
log('Rebundle...');
return stream.on('error', handleErrors)
.pipe(source(file))

View File

@ -4,7 +4,7 @@ var config = require('../config');
var http = require('http');
var express = require('express');
var gulp = require('gulp');
var gutil = require('gulp-util');
var log = require('fancy-log');
var morgan = require('morgan');
gulp.task('server', function() {
@ -24,7 +24,7 @@ gulp.task('server', function() {
var s = http.createServer(server);
s.on('error', function(err) {
if (err.code === 'EADDRINUSE') {
gutil.log('Development server is already started at port ' + config.serverPort);
log('Development server is already started at port ' + config.serverPort);
}
else {
throw err;

View File

@ -5,7 +5,8 @@
* Provides gulp style logs to the bundle method in browserify.js
*/
var gutil = require('gulp-util');
var colors = require('ansi-colors');
var log = require('fancy-log');
var prettyHrtime = require('pretty-hrtime');
var startTime;
@ -13,13 +14,13 @@ module.exports = {
start: function() {
startTime = process.hrtime();
gutil.log('Running', gutil.colors.green('\'bundle\'') + '...');
log('Running', colors.green('\'bundle\'') + '...');
},
end: function() {
var taskTime = process.hrtime(startTime);
var prettyTime = prettyHrtime(taskTime);
gutil.log('Finished', gutil.colors.green('\'bundle\''), 'in', gutil.colors.magenta(prettyTime));
log('Finished', colors.green('\'bundle\''), 'in', colors.magenta(prettyTime));
}
};

View File

@ -12,6 +12,7 @@
"angular-ui-bootstrap": "^1.2.3",
"angular-ui-router": ">=0.2.16 <0.3.0",
"angularjs-filters": "^0.0.2",
"ansi-colors": "^1.1.0",
"babelify": "^5.0.4",
"bootstrap": "^3.3.5",
"brfs": "^1.2.0",
@ -33,6 +34,7 @@
"eslint-config-openstack": "1.2.2",
"eslint-plugin-angular": "0.12.0",
"express": "^4.7.2",
"fancy-log": "^1.3.2",
"gulp": "^3.8.8",
"gulp-angular-templatecache": "^1.3.0",
"gulp-autoprefixer": "^2.0.0",
@ -50,7 +52,6 @@
"gulp-sourcemaps": "^1.3.0",
"gulp-streamify": "0.0.5",
"gulp-uglify": "^1.0.1",
"gulp-util": "^3.0.1",
"isparta": "^3.0.3",
"jasmine-ajax": "^3.1.1",
"jasmine-core": "^2.3.4",