webxl / grunt-reload

A grunt task and reverse proxy that enables live reloading of updated files in the browser.
MIT License
132 stars 19 forks source link

Clearer Documentation on how to setup livereload #27

Open joeybaker opened 11 years ago

joeybaker commented 11 years ago

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:

joeybaker commented 11 years ago

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'])