lingon-livereload
Advanced tools
Comparing version 0.2.0 to 0.3.0
'use strict'; | ||
var livereload = require('livereload'); | ||
var livereload = require('livereload'), | ||
connectLr = require('connect-livereload-safe'); | ||
module.exports = function(lingon, config) { | ||
var server; | ||
config = config || {}; | ||
// add script tag injection middleware to the express server | ||
lingon.one('serverConfigure', function() { | ||
lingon.one('afterBuild', function() { | ||
config = config || {}; | ||
config.port = config.port || 35729; | ||
// inject browser script tag | ||
lingon.server.use(connectLr({ | ||
port: config.port | ||
})); | ||
}) | ||
// start the livereload server | ||
lingon.one('serverStarted', function() { | ||
var server; | ||
// set livereload to watch the source dir | ||
@@ -18,8 +31,8 @@ config.watchDir = config.watchDir || process.cwd() + '/' + lingon.sourcePath; | ||
lingon.log('Livereload is reporting for duty...'); | ||
server = livereload.createServer(config); | ||
server.watch(config.watchDir); | ||
lingon.log('Livereload is listening on port ' + config.port); | ||
}); | ||
}; |
{ | ||
"name": "lingon-livereload", | ||
"description": "Livereload plugin for Lingon", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/javoire/lingon-livereload", | ||
@@ -28,3 +28,4 @@ "author": { | ||
"dependencies": { | ||
"livereload": "git://github.com/mnmly/node-livereload.git" | ||
"livereload": "git://github.com/napcs/node-livereload.git", | ||
"connect-livereload-safe": "~0.0.5" | ||
}, | ||
@@ -31,0 +32,0 @@ "devDependencies": { |
@@ -40,3 +40,3 @@ # Lingon Livereload | ||
A config object can be passed as a second parameter, taking the same options as [node-livereload](https://github.com/mnmly/node-livereload#options) does. Like so: | ||
A config object can be passed as a second parameter, taking the same options as [node-livereload](https://github.com/napcs/node-livereload#api-options) does. Like so: | ||
```JavaScript | ||
@@ -43,0 +43,0 @@ livereload(lingon, { |
@@ -6,2 +6,3 @@ 'use strict'; | ||
// retarded test | ||
describe('lingon-livereload', function() { | ||
@@ -8,0 +9,0 @@ it('should init', function() { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
6279
56
2
+ Addedconnect-body-rewrite@0.0.4(transitive)
+ Addedconnect-livereload-safe@0.0.5(transitive)
Updatedlivereload@git://github.com/napcs/node-livereload.git