Update livereload Invoke task and add docs

Removes the `livereload` dependency from `setup.py`.

Updates the `invoke livereload` task by moving the `livereload` import
into the task function since it is now an optional dependency.

Updates the Invoke section of the documentaion with instructions on
using the `livereload` Invoke task.
This commit is contained in:
John Franey 2019-06-18 22:56:18 -04:00
commit ca012bd288
3 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,6 @@ import datetime
from invoke import task
from invoke.util import cd
from livereload import Server
from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file
@ -90,6 +89,7 @@ def preview(c):
@task
def livereload(c):
"""Automatically reload browser tab upon file modification."""
from livereload import Server
build(c)
server = Server()
deploy_path = CONFIG['deploy_path']