Skip to content

use-init/init-livereload

Repository files navigation

INIT LiveReload

A plugin for INIT using grunt-contrib-watch to live reload your changed assets automatically in your browser.

Dependencies

devDependency Status

Installation

You can add this plugin to INIT by copying over the file config/watch.js to tasks/options (replace/override the old one). This enables livereload for CSS, JavaScript and images.

Usage

You have now live reload enabled when you run the grunt watch task. You still need either the browser extensions enabled or insert the following script right before your closing </body> tag:

<script src="//localhost:35729/livereload.js"></script>

If you use the livereload app in parallel you'll get an error message that the port is already in use. Quit the app or specify another port in watch.js:

livereload: {
	options: {
		livereload: 1337 // You can set any port number here instead of 'true' which sets it to port '35729'
	},
	files: [config.sass.devDest, config.js.files, config.img.src]
},

More…

You can see all possibilities here.

Contribute

Please help making this project better and contribute with your knowledge.

Development

This package is developed as part of the INIT project.

License

Please be aware of the licenses of each component we use in this project. Everything else that has been developed by the contributions to this project is under MIT License.

About

An INIT plugin to livereload assets in the browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published