Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on deprecated gulp-util #28

Merged
merged 1 commit into from
Dec 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ var stylish = require('jshint-stylish');
var root = __dirname;

gulp.task('clean', function() {
gulp.src([
return gulp.src([
'examples/*/tmp',
'test/tmp'
]).pipe(clean());
});

gulp.task('lint', function() {
gulp.src([ 'index.js', 'test/test.js', 'lib/*.js' ])
return gulp.src([ 'index.js', 'test/test.js', 'lib/*.js' ])
.pipe(jshint({ expr: true }))
.pipe(jshint.reporter(stylish));
});
Expand All @@ -26,7 +26,7 @@ gulp.task('test', function() {
// node lives in one process/scope/directory
process.chdir(root);

gulp.src('test/test.js')
return gulp.src('test/test.js')
.pipe(mocha({ reporter: 'spec', timeout: 1000 }))
});

Expand Down
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

var fs = require('fs');
var path = require('path');
var gutil = require('gulp-util');
var through2 = require('through2');
var PluginError = gutil.PluginError;
var PluginError = require('plugin-error');
var fancyLog = require('fancy-log');
var colors = require('ansi-colors');
var utils = require('./lib/utils');
var compress = require('./lib/compress.js');

Expand Down Expand Up @@ -84,7 +85,7 @@ module.exports = function (options) {

fs.exists(filepath, function(exists) {
if(exists) {
gutil.log(gutil.colors.green('Gzipped file ' + filepath + ' deleted'));
fancyLog(colors.green('Gzipped file ' + filepath + ' deleted'));
fs.unlink(filepath, complete);
} else {
complete();
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
}
],
"dependencies": {
"ansi-colors": "^1.0.1",
"bytes": "^0.3.0",
"gulp-util": "^2.2.14",
"fancy-log": "^1.3.2",
"plugin-error": "^0.1.2",
"stream-to-array": "~1.0.0",
"through2": "^0.4.1"
},
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var clean = require('gulp-clean');
var fs = require('fs');
var gulp = require('gulp');
var log = require('gulp-util').log;
var log = require('fancy-log');
var gzip = require('../');
var nid = require('nid');
var rename = require('gulp-rename');
Expand Down