docpad-plugin-livereload

Automatically refreshes your website whenever a rengeration is performed

npm install docpad-plugin-livereload
78 downloads in the last day
353 downloads in the last week
1 231 downloads in the last month

Live Reload Plugin for DocPad

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Automatically refreshes your DocPad built website whenever a regeneration is performed

Install

  1. Install the Plugin

     docpad install livereload
    
  2. Ensure your layout outputs the scripts block

    1. In eco:

       <%- @getBlock('scripts').toHTML() %>
      
    2. In jade:

       != getBlock('scripts').toHTML()
      

Configure

enabled

This option specifies whether or not this plugin should be enabled or disabled, by default it is true for the development environment and false for all other environments.

inject

This option specifies whether or not we should try to inject our socket library into the page. It is true by default.

getSocket

This option when falsey (the default) means we will create our own socket instance, however if you already have your own socket instance you can set this option as a function that will return your own socket instance.

channel

This option specifies the which channel we should listen to, it defaults to /docpad-livereload

socketOptions

This option allows you to customise the primus configuration that we use if we have to create our own instance.

generateBeforeBlock, generateAfterBlock, listenBlock, injectBlock, scriptBlock, styleBlock

These options allow you to customise the content of the scripts and styles that are injected into your page by this plugin. Check out the source code of this plugin to figure out their usage.

Troubleshooting

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Licensed under the incredibly permissive MIT license

Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)

npm loves you