Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lingon-livereload

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lingon-livereload - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

25

lib/lingon-livereload.js
'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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc