• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 13 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

LiveReload support for Middleman

Middleman-Livereload

middleman-livereload is an extension for the Middleman static site generator that adds livereloading functionality.

Installation

If you're just getting started, install the middleman gem and generate a new project:

gem install middleman
middleman init MY_PROJECT

If you already have a Middleman project: Add gem "middleman-livereload", "~> 3.4.3" to your Gemfile and run bundle install

Configuration

activate :livereload

The extension supports a number of options that can be given to the activate statement. Eg:

activate :livereload, apply_js_live: false

:host and :port

Livereload's listener host/port, these options get passed to ::Rack::LiveReload middleware. Defaults:'0.0.0.0' and '35729'.

:js_host and :js_port

Similar to the :host and :port options, but allow you to specify a different host and port at the frontend Javascript level than at the backend EventMachine level. Useful when running behind a proxy or on a Docker VM. Defaults to :host and :port.

:apply_js_live and :apply_css_live

Whether live reload should attempt to reload javascript / css 'in-place', without complete reload of the page. Both default to true.

⚠️ It does not work with @import'ed CSS files or require'd JS files (because of LiveReload not providing enough information regarding dependencies). On those kind of files, a full page reload will be triggered.

:no_swf

Disable Flash polyfil for browsers that support native WebSockets.

:ignore

Array of patterns for paths that must be ignored. These files will not be injected with the LiveReload script.

String#match is used for ignoring, so you can use any valid Ruby regular expression in this array.

:livereload_css_target

CSS file to reload when detecting @imported partial was modified. Default stylesheets/all.css).
To opt out set livereload_css_target: nil.

:livereload_css_pattern

Regexp matching filenames that should trigger reload of :livereload_css_target when changed. Default: Regexp.new('_.*\.css').

:wss_certificate and :wss_private_key

Support secure sockets (WSS) by passing TLS certificate & private key, for example if you're using middleman server --https in development.

Build & Dependency Status

Gem Version Build Status Dependency Status Code Quality

Community

The official community forum is available at: https://forum.middlemanapp.com

Bug Reports

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-livereload/issues

The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.

How to Run Cucumber Tests

  1. Checkout Repository: git clone https://github.com/middleman/middleman-livereload.git
  2. Install Bundler: gem install bundler
  3. Run bundle install inside the project root to install the gem dependencies.
  4. Run test cases: bundle exec rake test

Donate

Click here to lend your support to Middleman

License

Copyright (c) 2010-2013 Thomas Reynolds. MIT Licensed, see LICENSE for details.

More Repositories

1

middleman

Hand-crafted frontend development
Ruby
7,048
star
2

middleman-blog

Blog Engine Extension for Middleman
Gherkin
325
star
3

middlemanapp.com

Documentation for Middleman
SCSS
267
star
4

middleman-syntax

Code syntax highlighting plugin via Rouge for Middleman
Ruby
179
star
5

middleman-autoprefixer

Autoprefixer integration with Middleman
Ruby
116
star
6

middleman-minify-html

A HTML whitespace minifier for Middleman
Ruby
77
star
7

middleman-sprockets

Sprockets support for Middleman
Gherkin
63
star
8

middleman-directory

Directory of Middleman extensions, templates and services
SCSS
31
star
9

middleman-asciidoc

πŸ”° AsciiDoc support for Middleman 4. (In Middleman 3, AsciiDoc support is provided by a core extension).
Gherkin
27
star
10

middleman-heroku

Precompile your static Middleman site when you push to Heroku
CSS
19
star
11

middleman-smusher

Use Smusher in Middleman
Ruby
18
star
12

middleman-clowncar

Clowncar responsive images for Middleman
Ruby
17
star
13

middleman-backbone

Backbone Boilerplate support for Middleman 3.0
JavaScript
15
star
14

middleman-sitemap-api

JSON API for Middleman Sitemap
Ruby
11
star
15

middleman-i18n

Internationalization extension for Middleman (Built-in to 3.0)
Ruby
11
star
16

middleman-templates-blog

Default new blog project template for Middleman
Ruby
10
star
17

middleman-templates-default

Default new project template for Middleman
Ruby
8
star
18

middleman-compass

v4+ support for Compass v1
Ruby
6
star
19

middleman-pipeline

Rake::Pipeline support for Middleman
Ruby
4
star
20

middleman-docker

Docker container for Middleman
Shell
4
star
21

middleman-templates-default-v5

Ruby
2
star
22

middleman-scss-lint

Ruby
2
star