grunt livereload not working

I need to have live reload working otherwise i feel time is wasting with needless keystrokes.
But i have killed some serious time setting it up too.
Hope this post will save everyone some keystrokes.

Install your modules locally with terminal in your project directory

Livereload is built into the “grunt-contrib-watch” module. Installing this module into your project root directory is essential to livereload.
Im also using compass contrib (css) and uglify (compression) modules in this example as they are apart of my usual work flow.

Reload script

Secondly, put this just before the closing body tag in the footer. Reload will not work without this.

Package.json file config

Save into your project root directory.

gruntfile.js

Save into your project root directory.

Run Watch

Now run the watch command in verbose mode to see which files grunt is watching.

Everytime a change is saved to one of the watched files your browser should refresh.

Comments are closed.