Question: I'm using Gulp.js to watch sass files in my project and auto-compile/minify them. I've got my PHPStorm set up to automatically deploy(upload) changed files, including external changes.

The problem I'm having is that PHPStorm doesn't recognize the external changes to files until I switch to a different app, then back to PHPStorm. Is there a way I could programmatically tell PHPStorm when to do a check for changed files?

Thanks in advance for any help!

Answer: 
you should start your gulp command with return like:

```
return gulp.src(PATHS.site_src + 'Styles/*.scss')

```
I used rsync inside of my gulp watch task i.e.

```js
gulp.task('watch', function() {
  var watcher = gulp.watch('/path/to/sassfile.scss', ['sass']);
  watcher.on('change', function(event) {
    console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
    gulp.src('/path/to/compiledcss.css')
      .pipe(rsync({
        hostname: 'dev.example.com',
        username: 'foo',
        progress: true,
        destination: '/path/on/remote/server'
      }));
  });
});
```

You'll need to download gulp-rsync (<https://www.npmjs.com/package/gulp-rsync>) and generate the correct paths, but this seems to work for me