hi. i’m having a bit of trouble with getting grunt to auto-reload after i make changes to my css and html.
i know livereload was deprecated and now comes built into grunt-contrib-watch so i’m not too sure why it’s not reloading automatically?
looking over the web there seem to be few solutions but none seem to work for the roots theme. is there something i have to change in the gruntfile.js to get livereload to work?
i’ve just got my head around the idea of grunt so i apologise if the solution is obvious.
You still need to enable livereload in your Gruntfile even though its been merged into grunt-contrib-watch. You also need a browser plugin or a script tag added like that PR above mentions.
Keep in mind that you don’t want to leave that script tag in the production version of your theme. That’s one of the reasons we don’t enable livereload in Roots by default.
Since two commits were made for live reload, wouldn’t it also be good to add “//localhost:35729/livereload.js” to the $assets of the development environment scripts.php file? Maybe only enable it if livereload is set to “true” in the grunfile.js?