Skip to content

Commit

Permalink
Eemove deprecated gulp-util (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbennett10 authored and demurgos committed Aug 18, 2018
1 parent bbf71b1 commit f7eeeba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

var es = require('event-stream');
var log = require('fancy-log');
var minilr = require('mini-lr');
var relative = require('path').relative;
var _assign = require('lodash.assign');
var debug = require('debug')('gulp:livereload');
var gutil = require('gulp-util');
var magenta = require('chalk').magenta;

/**
Expand Down Expand Up @@ -124,7 +124,7 @@ exports.changed = function (filePath) {
exports.server.changed({ body: { files: [ filePath ] } });

if (!options.quiet) {
gutil.log(magenta(filePath) + ' reloaded.');
log(magenta(filePath) + ' reloaded.');
}
};

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
"chalk": "^0.5.1",
"debug": "^2.1.0",
"event-stream": "^3.1.7",
"gulp-util": "^3.0.2",
"fancy-log": "^1.3.2",
"lodash.assign": "^3.0.0",
"mini-lr": "^0.1.8"
"mini-lr": "^0.1.8",
"vinyl": "^2.1.0"
},
"devDependencies": {
"mocha": "^2.0.1",
Expand Down
7 changes: 4 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
'use strict';

var gutil = require('gulp-util');
var fancyLog = {log: require('fancy-log')};
var es = require('event-stream');
var minilr = require('mini-lr');
var Vinyl = require('vinyl');
var glr = require('../index.js');
var sinon = require('sinon');
var assert = require('assert');

var cwd = process.cwd();
var file = new gutil.File({ base: cwd, cwd: cwd, path: cwd + '/style.css' });
var file = new Vinyl({ base: cwd, cwd: cwd, path: cwd + '/style.css' });
var keys = ['basePath', 'key', 'cert', 'start', 'quiet', 'reloadPage'];
var srv, log;

describe('gulp-livereload', function() {
beforeEach(function() {
srv = sinon.stub(minilr, 'Server');
log = sinon.stub(gutil, 'log');
log = sinon.stub(fancyLog, "log");
});
afterEach(function() {
keys.forEach(function(key) {
Expand Down

0 comments on commit f7eeeba

Please sign in to comment.