New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-trigger-lr

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-trigger-lr

Grunt plugin for triggering LiveReload using a task.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-trigger-lr

Grunt plugin for triggering LiveReload using a task.

What does this provide?

This complements the functionality of grunt-contrib-watch and tiny-lr.

For example:

  1. You can start your own livereload server, and still trigger it from a watch task. This is useful if you want to use grunt-contrib-watch's reload: true option. By starting the livereload server outside of grunt, it can persist even if grunt reloads itself.

  2. You can carefully control the timing of the livereload trigger. For example, if you are recompiling the entire site, you can trigger livereload one time after you are finished. (To do this with grunt-contrib-watch, you must watch the generated files.)

Installation

Install grunt-trigger-lr by running:

npm install grunt-trigger-lr

Example

grunt.config.extend({

    trigger_lr: {
        options: {
            port: 37001,
        },
    },

    watch: {
        base_templates: {
            files: 'index.html',
            tasks: [
                'assemble',
                'trigger_lr:everything',
            ],
        },
    },
});

grunt.loadNpmTasks('grunt-trigger-lr');

Built-in targets

trigger_lr:everything

Reload everything. Equivalent to:

{ options: { everything: true } }
trigger_lr:watched

Reload watched paths. Equivalent to:

{ options: { watched: true } }

Options

host

The hostname or IP address of the livereload server. (String. Default: localhost)

port

The port running the livereload server. (Number. Default: 35729)

scheme

The scheme ('http' or 'https') for the livereload server. (String. Default: http)

everything

If true, reloads everything. (Default: false)

watched

If true, reload the paths which have received a watch event. (Default: false)

paths

If specified, reload the specified paths. (Default: undefined)

Contribute

  • Issue Tracker: github.com/bodylabs/grunt-trigger-lr/issues
  • Source Code: github.com/bodylabs/grunt-trigger-lr

License

The project is licensed under the two-clause BSD license.

Keywords

FAQs

Package last updated on 08 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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