SOLVED: Using less. needing CSS file to upload to server after executing the compile.
Answered
Hi,
Not sure how to do this.
I'm currently using a file watcher to compile my LESS to CSS - That works fine.
However, I'd love to have the CSS file upload to the server automatically after compiling.
Automatic upload is switched on, but that seems to only work on files that I manually save.
Please sign in to leave a comment.
Hi there,
>Automatic upload is switched on, but that seems to only work on files that I manually save.
Please show your File Watcher settings. Sounds like it's not configured properly for the expected behaviour.
The key here is to provide the path to such generated .css file in "Output paths to refresh" field -- that's what IDE will check after File Watcher is done running and Deployment system will see that this file was modified and will auto upload together with source .less file.
https://www.jetbrains.com/help/phpstorm/using-file-watchers.html#transpilerBehaviour
Ok, thanks.
Here's my current settings. My CSS file is in the same directory as the LESS file.
All help much appreciated.
That field looks fine to me.
Try with "Auto-save edited files to trigger the watcher" option disabled. Right now IDE will try to save the file (and therefore run file watcher) after 0.5 sec or so delay after you press any key in that file. That might may prevent auto-upload (not super sure .. but worth checking out).
ALSO: show you auto-upload settings. File modified by File Watcher is considered an External change .. so appropriate option must be enabled as well.
|| File modified by File Watcher is considered an External change .. so appropriate option must be enabled as well.
That worked!
Awesome.. Thank you. That had been bugging me for longer than I care to admit.