# LiveReload for Sublime Text 3 and 4 A web browser page reloading plugin for the [Sublime Text](https://www.sublimetext.com "Sublime Text") editor. ## Installing With [Package Control](https://packagecontrol.io): 1. Run “Package Control: Install Package” command, find and install `LiveReload` plugin. 2. Restart ST editor (if required) ### Manual install Open your Packages folder (Preferences > Browse Packages...), then: ``` rm -rf LiveReload git clone https://github.com/aik099/LiveReload-sublimetext4 LiveReload ``` Restart Sublime Text afterwards. # Using Enable desired plug-ins via Command Palette (Ctrl+Shift+P) add livereload.js to you html document. ``` ``` You can also use a browser extension that implements the LiveReload protocol instead of the script tag. ## 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 - Simple Reload from http GET request, reloads page on visit to http://localhost:35729/callback/simplereloadplugincallback/on_post_compile - Send content on change, sends file content to browser console ## Sass Preprocessor usage First, install latest version of sass ```bash sudo gem install sass ``` Activate the plugin 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: ```json { "destination_dir": "../../webroot/css" } ``` # Plug-in api See the `PluginClass` docstrings in [server/PluginAPI.py](server/PluginAPI.py) and the bundled plug-ins (e.g. [SimpleReloadPlugin.py](SimpleReloadPlugin.py)) as examples. # History - [dz0ny/LiveReload-sublimetext2](https://github.com/dz0ny) — the original plugin, written by [Janez Troha](https://github.com/dz0ny) for Sublime Text 2 - [alepez/LiveReload-sublimetext3](https://github.com/alepez/LiveReload-sublimetext3) — Sublime Text 3 port, on Package Control since 2016 (archived) - [adamserafini/LiveReload-sublimetext4](https://github.com/adamserafini/LiveReload-sublimetext4) — Sublime Text 4 fixes - this repository — Python 3.14 plugin host support (Sublime Text 4 build 4213+), still working on the Python 3.3 and 3.8 hosts