Skip to content

Commit

Permalink
Fix livereload for npm v3
Browse files Browse the repository at this point in the history
Fixes #94

The tiny-lr project has seemingly been abandoned and no new release has been cut for months to provide the support for npm v3. As such, I've forked the project and released mini-lr moving forward.

More Info: mklabs/tiny-lr#91
  • Loading branch information
elwayman02 committed Sep 25, 2015
1 parent 274f575 commit f7d6197
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ You can also tell the browser to refresh the entire page. This assumes the page

### livereload.middleware

You can also directly access the middleware of the underlying server instance (tiny-lr.middleware) for hookup through express, connect, or some other middleware app
You can also directly access the middleware of the underlying server instance (mini-lr.middleware) for hookup through express, connect, or some other middleware app

### livereload.server

gulp-livereload also reveals the underlying server instance for direct access if needed. The instance is a "tiny-lr" instance that this wraps around. If the server is not running then this will be `undefined`.
gulp-livereload also reveals the underlying server instance for direct access if needed. The instance is a "mini-lr" instance that this wraps around. If the server is not running then this will be `undefined`.

Debugging
---
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var es = require('event-stream');
var tinylr = require('tiny-lr');
var minilr = require('mini-lr');
var relative = require('path').relative;
var _assign = require('lodash.assign');
var debug = require('debug')('gulp:livereload');
Expand Down Expand Up @@ -63,7 +63,7 @@ exports.server = undefined;
* A direct reference to the underlying servers middleware reference
*/

exports.middleware = tinylr.middleware;
exports.middleware = minilr.middleware;

/**
* Start the livereload server
Expand Down Expand Up @@ -91,7 +91,7 @@ exports.listen = function(opts, cb) {
}

options = _assign(options, opts);
exports.server = new tinylr.Server(options);
exports.server = new minilr.Server(options);
exports.server.listen(options.port, options.host, function() {
debug('now listening on port %d', options.port);
if(typeof cb === 'function') cb.apply(exports.server, arguments);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"event-stream": "^3.1.7",
"gulp-util": "^3.0.2",
"lodash.assign": "^3.0.0",
"tiny-lr": "^0.1.5"
"mini-lr": "^0.1.8"
},
"devDependencies": {
"mocha": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var gutil = require('gulp-util');
var es = require('event-stream');
var tinylr = require('tiny-lr');
var minilr = require('mini-lr');
var glr = require('../index.js');
var sinon = require('sinon');
var assert = require('assert');
Expand All @@ -14,7 +14,7 @@ var srv, log;

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

0 comments on commit f7d6197

Please sign in to comment.