Detalhes do pacote

docpad-plugin-livereload

docpad98MIT2.11.0

Automatically refreshes your website whenever a rengeration is performed

auto-update, autoupdate, coffeescript, docpad

readme (leia-me)

Live Reload Plugin for DocPad

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal 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

pathname

This option specifies the the pathname that primus should use, 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 release 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?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

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

License

Unless stated otherwise all works are:

and licensed under:

changelog (log de mudanças)

History

v2.11.0 2020 August 6

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=4.5.0 to node: >=10 to keep up with mandatory ecosystem changes

v2.10.0 2018 July 11

  • Updated base files using boundation
  • Compiled with CoffeeScript v2
  • Updated dependencies

v2.9.0 2017 April 3

  • Updated dependencies

v2.8.0 2017 April 2

  • Updated base files

v2.7.1 2015 October 16

  • pathname configuration now actually does what it was suppose to
  • If a custom 404 middleware was added, should no longer interfere with primus as we now use the correct serverExtend event rather than serverAfter

v2.7.0 2015 October 16

  • socketOptions configuration now actually does what it was suppose to
  • Updated dependencies

v2.6.1 2015 March 10

  • Updated dependencies

v2.6.0 2014 February 9

  • Updated dependencies

v2.5.6 2014 January 10

  • Updated dependencies

v2.5.5 2014 January 4

  • Updated dependencies

v2.5.4 2013 December 12

  • Updated dependencies

v2.5.3 2013 August 29

  • Updated dependencies

v2.5.2 2013 August 13

  • We now destroy the sockets when docpad gets destroyed

v2.5.1 2013 July 31

v2.5.0 2013 July 31

v2.4.0 2013 May 6

v2.3.1 2013 March 7

  • Repackaged

v2.3.0 2013 January 19

  • Removed shrinkwrap file, hopefully dependency issues have been resolved
  • Added getSocket configuration option so you can now use existing sockets if you wish
  • Made the socket.io log level customisable via the defaultLogLevel config option and now defaults to 1 unless in debug mode which defaults to 3 - Closes pull request #4 thanks to Alex
  • Added the ability to customise the socket options via socketOptions config option
  • Added the ability to customise the channel we listen on via the channel config option, also changed the default channel from /docpad-live-reload to /docpad-livereload
  • We will now log to the browser if we were reloaded by livereload, this can be turned off via the browserLog config option
  • Added the ability to customise what happens at regeneration via the regenerateBlock config option

v2.2.0 2012 December 29

  • Added a npm shrinkwrap file due to recent dependency issues some people suffered
  • Now only injects the socket.io script if it isn't already defined
  • Added a basic generate test

v2.1.2 2012 October 2

  • Added support for DocPad v6.7

v2.1.1 2012 August 10

  • Re-added markdown files to npm distribution as they are required for the npm website

v2.1.0 2012 July 18

  • Renamed from live-reload to livereload to follow new DocPad convention
  • Updated for DocPad v6.3.0