Take the 2-minute tour ×

sorry for the mistakes I've made, I'm not Englishman.

So.. First, I have Vagrant machine which is my web server with installed Yii, Ngnix, PHP etc. The vm is configured as follows:

forwarded_port, guest: 80, host: 8080
synced_folder "www", "/srv/www", :nfs => true # !important

Second, I have Grunt which is installed on my local machine and do some tasks(watches *.scss files and converts them to css) within web root which is synced with Vagrant through nfs daemon.

I successfully do my tasks and connect to my web root through browser (localhost:8080) and everything works ok. However, I don't understand how can I implement simple reload browser page when Grunt watches my scss files and finishes to convert them into a single css file.

Could anybody give me some thoughts by simple English?

share|improve this question
Take a look at this don't know if it's the same thing but stackoverflow.com/questions/19382708/… –  Jompper Jan 16 at 14:55
Thank you, but it is different thing.. –  Timur Fayzrakhmanov Jan 16 at 20:41

2 Answers 2

up vote 1 down vote accepted

You'll want to add a browser plugin to your browser and then have watch notify it. More info here at the bottom: http://24ways.org/2013/grunt-is-not-weird-and-hard/

share|improve this answer
I've tried this (livereload option with grunt-contrib-watch), but unfortunately it doesn't work( Nonetheless big thank you! good article! –  Timur Fayzrakhmanov Jan 16 at 20:41
@TimurFayzrakhmanov a guess on why it might not be working. Might your firewalls (in on your main machine or out on your vagrant machine) be blocking the communication of the watch notification? –  acorncom Jan 17 at 1:01
@TimurFayzrakhmanov Yep, that might be the issue. feedback.livereload.com/knowledgebase/articles/… stackoverflow.com/questions/19268136/… –  acorncom Jan 17 at 1:04

I solve the problem by just restarting browser! This is little instruction:

  1. Gruntfile:

    watch: {
        scss: {
            files: '<%= path.webapp %>/**/*.scss',
            tasks: ['sass'],
            options: {
                livereload: true, //! important
  2. Add livereload plugin to the chrome. After CLOSE THE BROWSER!

  3. Start the task in command line: grunt watch
  4. Start the browser. And click to the livereload circle button at the top of the window.
  5. Voila! It works.

IMPORTANT: there is no reason to worry about the port and address of your 'remote' server, livereload magically detect where need to restart the page. Is works for me as localhost:8080/webapp.com and identically

share|improve this answer

Your Answer


