0

I can't seem to get the livereload option to work on the grunt-contrib-watch task.

I have the local host livereload.js file attached at the bottom of my html file.

When i go to http://localhost:35729/ all i get is the following:

{"tinylr":"Welcome","version":"0.0.5"}

Everything seems to be set up and working correctly. Even when i run grunt --verbose it says Live reload server started on port: 35729.

Below is my watch configuration in my gruntfile

Any help would be appreciated!

      watch: {
        options:{
            livereload: true,
        }

        styles: {
            files: ['less/**/*.less'], // which files to watch
            tasks: ['less'],
            options: {
                nospawn: true
            }
        },
        html:{
            files: ['site/**/*.html', 'includes/**/*.html'],
            tasks: ['includes'],
            options: {
                nospawn: true,
            }
        }

    }
}); 
whatsnewsaes
  • 405
  • 2
  • 5
  • 13

1 Answers1

0

The output you are seeing is correct. http://localhost:35729 is the LiveReload server, not your app.

Looking at your code, you haven't included the LiveReload script in your index.html.

I've sent you a pull request and can confirm the LiveReload is working.

Moz Morris
  • 6,681
  • 2
  • 20
  • 18
  • Hmmm...I tried localhost:9000 and it says webpage is not available. here is a link to my gruntfile.js http://jsfiddle.net/t73evmwj/ If you'd like to view my project I'm trying to get it to work on you can view it here https://github.com/CodesummitGoats/Sparkplug-Framework – whatsnewsaes Nov 30 '14 at 20:50