Skip to content

Commit

Permalink
Remove gulp-util deprecated package
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsmirnov committed Jan 17, 2018
1 parent 96af27e commit a1ed41a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import del from 'del';
import sequence from 'run-sequence';
import yargs from 'yargs';
import path from 'path';
import util from 'gulp-util';
import log from 'fancy-log';
import _ from 'lodash';
import jsdoc from 'gulp-jsdoc3';
import open from 'open';
Expand Down Expand Up @@ -33,7 +33,7 @@ const plugins = {
};

import version from './tools/version';
util.log(version.copyright);
log(version.copyright);

import webpackConfig from './webpack.config.babel';
import webpackDevConfig from './webpack.dev.babel';
Expand Down Expand Up @@ -74,7 +74,7 @@ gulp.task('lint:js', () =>
.pipe(plugins.eslint())
.pipe(plugins.eslint.format('visualstudio', function(msg) {
if (msg !== 'no problems') {
util.log(util.colors.red('Lint errors found:\n\n') + msg);
log('Lint errors found\n\n' + msg + '\n');
}
}))
.pipe(plugins.eslint.failAfterError()));
Expand Down Expand Up @@ -178,9 +178,9 @@ gulp.task('build:css', () =>
gulp.task('build:demo', done =>
webpack(webpackConfig, function(err, stats) {
if (err) {
throw new util.PluginError('webpack', err);
throw new Error(err);
}
util.log('[webpack]', stats.toString({
log('[webpack]', stats.toString({
colors: true,
assets: false,
chunks: true,
Expand Down Expand Up @@ -295,10 +295,10 @@ gulp.task('serve:webpack', () => {
new WebpackDevServer(webpack(webpackDevConfig), webpackDevConfig.devServer)
.listen(webpackPort, 'localhost', (err) => {
if (err) {
throw new util.PluginError('[WDS]', err);
throw new Error(err);
}
const uri = 'http://localhost:' + webpackPort + '/webpack-dev-server/';
util.log('[WDS]', uri);
log('[WDS]', uri);
open(uri);
});
});
Expand All @@ -314,7 +314,7 @@ gulp.task('show:docs', () =>
gulp.task('show:e2e', (done) => {
glob(config.e2e.show, (e, files) => {
Promise.all(_.map(files, (filename) => new Promise((resolve, reject) => {
util.log('open', filename);
log('open', filename);
open(filename, (error) => {
if (error) {
reject(error);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.8.0",
"express": "^4.16.2",
"fancy-log": "^1.3.2",
"file-loader": "^1.1.6",
"glob": "^7.1.2",
"gulp": "^3.9.1",
Expand All @@ -87,7 +88,6 @@
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.3",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.7",
"handlebars": "^4.0.11",
"html-webpack-plugin": "^2.29.0",
"jquery": "^3.2.1",
Expand Down

0 comments on commit a1ed41a

Please sign in to comment.