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

removed deprecated gulp-util #127

Merged
merged 2 commits into from
Aug 18, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is vinyl used outside of test/index.js? I may be missing something but i think that vinyl should be in the devDependencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"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