LiveReload plugin for SublimeText
CSS Python CoffeeScript HTML PHP Shell
Switch branches/tags
Clone or download
Pull request Compare This branch is 35 commits ahead of sgricci:master.
Latest commit 18e784c Jan 16, 2018
alepez committed Jan 16, 2018 Merge pull request #6 from Erwane/fix-sass-destination-path
Fix sass destination path
Permalink
Failed to load latest commit information.
docs Make Livereload works with ST3 Oct 14, 2014
messages Update install_upgrade.txt Jan 13, 2016
server Fix import error on Sublime 3dev Oct 1, 2016
snippets Make Livereload works with ST3 Oct 14, 2014
test Make Livereload works with ST3 Oct 14, 2014
web Make Livereload works with ST3 Oct 14, 2014
.gitignore Make Livereload works with ST3 Oct 14, 2014
.no-sublime-package Make Livereload works with ST3 Oct 14, 2014
.travis.yml Make Livereload works with ST3 Oct 14, 2014
CoffeescriptPlugin.py Make Livereload works with ST3 Oct 14, 2014
CommandAPI.py LiveReloadHelp goes to a working site Sep 22, 2016
CompassPlugin.py Make Livereload works with ST3 Oct 14, 2014
CompassPlugin.sublime-settings Make Livereload works with ST3 Oct 14, 2014
Default.sublime-commands Make Livereload works with ST3 Oct 14, 2014
LESSPlugin.py Make Livereload works with ST3 Oct 14, 2014
LiveReload.py Make Livereload works with ST3 Oct 14, 2014
LiveReload.sublime-settings Make Livereload works with ST3 Oct 14, 2014
Main.sublime-menu Make Livereload works with ST3 Oct 14, 2014
Makefile Make Livereload works with ST3 Oct 14, 2014
README.md update documentation with Sass usage Jan 15, 2018
SassPlugin.py fix sass precompressor destination path Jan 16, 2018
SassPlugin.sublime-settings sass plugin with option Jan 12, 2018
SimpleReloadCallback.py Make Livereload works with ST3 Oct 14, 2014
SimpleReloadPlugin.py Make Livereload works with ST3 Oct 14, 2014
SimpleReloadPluginDelay.py Make Livereload works with ST3 Oct 14, 2014
SimpleWSCallback.py Make Livereload works with ST3 Oct 14, 2014
__init__.py Make Livereload works with ST3 Oct 14, 2014
messages.json Make Livereload works with ST3 Oct 14, 2014
pylint.rc Make Livereload works with ST3 Oct 14, 2014
requirements.txt Make Livereload works with ST3 Oct 14, 2014

README.md

LiveReload for Sublime Text 3

A web browser page reloading plugin for the Sublime Text 3 editor.

Installing

With Package Control:

  1. Run “Package Control: Install Package” command, find and install LiveReload plugin.
  2. Restart ST editor (if required)

Manual install, Linux users

cd ~/.config/sublime-text-3/Packages
rm -rf LiveReload
git clone https://github.com/alepez/LiveReload-sublimetext3 LiveReload

Manual install, OSX users

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
rm -rf LiveReload
git clone https://github.com/alepez/LiveReload-sublimetext3 LiveReload

Using

Enable desired plug-ins via Command Palette (Ctrl+Shift+P) add livereload.js to you html document.

<script>document.write('<script src="http://' + (location.host || '${1:localhost}').split(':')[0] + ':${2:35729}/livereload.js?snipver=1"></' + 'script>')</script>

You can also use one of the extensions listed here http://livereload.com/extensions/

Available plug-ins:

  • Compass Preprocessor, compiles .scss, .sass and refreshes page when file is compiled
  • Less Preprocessor, compiles .less and refreshes page when file is compiled
  • Sass Preprocessor, compiles .scss, .sass with the latest installed sass version and refreshes page when file is compiled
  • CoffeeScript Preprocessor, compiles .coffee and refreshes page when file is compiled
  • Simple Reload, refresh page when file is saved
  • Simple Reload with delay(400ms), wait 400ms then refresh page, when file is saved

Examples

Sass Preprocessor usage

First, install latest version of sass

sudo gem install sass

Activate the plugin in SublimeText3 via the package settings -> livereload -> plugins -> enable/disable plugins menu

By default, the plugin save the compiled css in same dir of sources. You can change this by creating a sass_config.json file near your sources:

{
    "destination_dir": "../../webroot/css"
}

Plug-in api

https://livereload-for-sublime-text.readthedocs.org/en/latest/

Thanks

The original plugin was written by Janez Troha