2

I have a Gulp task that listens for any Sass file changes. This happens independently of PhpStorm; it updates my CSS file. The Live Edit doesn't see the update.

If I manually open the CSS file in PhpStorm and make a change and save it, then it does update it on the site.

Googling showed to create a file watcher, but that's to run the Sass compiler which is entirely unneeded. I need PhpStorm to watch that file actively and if it changes, update it.

How can that be accomplished?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
phazei
  • 5,323
  • 5
  • 42
  • 46
  • 1
    PhpStorm does not check for external file modifications all the time, only on certain situations (e.g. switching back to app). That's why File Watcher is suggested as it will launch that process from within the IDE and will be able to detect when it finish running so it can re-read modified files. – LazyOne Sep 28 '18 at 09:19
  • do you launch your Gulp task from within PhpStorm, using Gulp tool window/run configuration? Normally IDE virtual file system should be synchronized in such cases, and Live Edit should see the changes – lena Sep 28 '18 at 12:54
  • I do use the gulp run window, but it still doesn't update. Also, I tried to run a watcher, I set the css as the file to watch and the output path to refresh. I just had a random app going since it just needed to watch the file and not actually do anything. Maybe I'll have it run "touch file.css" – phazei Sep 28 '18 at 15:54
  • Actually, setting the program to run as `touch` actually worked, but now it's saving my *.sass files on every keypress, didn't even set any watcher for those, and disabled the only watcher I had for the css file but even then needed to restart php for it to stop. Tried enabling the watcher, and it happened again. How is the watcher even aware of the sass files? It's not in any path or extension set on the watcher. – phazei Sep 28 '18 at 17:31
  • Saving on each keystroke only happens on LiveEdit. If I edit a JS file, it doesn't show as saved but still says 1 script loaded in the log. If I edit the sass it saves on every keystroke, even with watcher and gulp task off. It does't say anything was loaded since the file isn't on the site so I have no idea why it's touching them, they happen to be in the site path urls set in the debug config, that it. I even marked my sass folder as 'excluded' and it still does it. – phazei Sep 28 '18 at 18:00

0 Answers0