grunt-reload
grunt-reload copied to clipboard
Clearer Documentation on how to setup livereload
I've been figure out how to enable the "livereload" functionality of grunt-reload (no page refreshes for css/image changes), and have so far been unsuccessful.
The Readme states:
...
port: 35729, // LR default
liveReload: {}
...
…is necessary work with the livereload extension. This appears to be true, using the livereload browser extension will trigger a full page refresh, but not trigger the "livereload" capabilities.
Then, in the tests:
liveReloadTest: {
// test at any URL with LR extension enabled
port: 35729, // LR default
liveReload: {
apply_css_live: true,
apply_images_live: true
}
},
The extra options under liveReload aren't documented, (and seem to have no effect)?
All of which leaves me with several questions:
- What's the proper way to get "livereload" functionality from grunt-reload? (It appears that a blocking issue is: https://github.com/gruntjs/grunt-contrib-watch/pull/41)
- #3 asks for a modification for
client.js(actuallyreloadClient.js). How is it that simply usinglivereload.jsdoesn't solve the problem?
FWIW, the Gruntfile I'm working with looks something like this:
, watch: {
sass: {
files: 'assets/sass/**/*.scss'
, tasks: ['compass:dev']
, interrupt: true
}
, css: {
files: 'assets/css**/**/*.css'
, tasks: ['reload']
, interrupt: true
}
…
, reload: {
port: 35729 // LR default
, liveReload: {
'apply_css_live': true
, 'apply_images_live': true
}
, proxy: {
host: 'localhost'
, port: 8888
}
}
…
grunt.registerTask('code', ['reload', 'watch'])