11

I am deploying my documents automatically to the server.

When I save my .less / .sass files, the File Watcher transpiles them, but only uploads the source files, not the transpiled .css file.

Is there a way that the .css file is also being deployed?

user3553562
  • 119
  • 1
  • 8

1 Answers1

23

Make sure to tick the 'Upload external changes' checkbox in Deployment/Options. This option makes PHPStorm upload the files changed by a third-party tool (LESS compiler in your case). See http://www.jetbrains.com/webstorm/webhelp/deployment.html and related topics for more info

lena
  • 90,154
  • 11
  • 145
  • 150
  • I never peeked into 'Options' before, thank you for the hint! – Marc-André Appel Apr 29 '15 at 07:43
  • 6
    Does anyone else have the issue where they have to lose and regain focus of phpStorm for the external changes to be detected by phpstorm, and henceforth uploaded? – Owen McAlack Jul 16 '15 at 20:04
  • do you use a file watcher to compile .less? Usually such problems indicate configuration issues: 'output paths to refresh' file watcher option is not set up correctly, so that the generated files don't appear in PHPStorm virtual file system until it's synchronized with external changes (that usually happens when you move focus back to the IDE) – lena Jul 20 '15 at 10:04
  • And now I understand what that checkbox is for. Thanks! – Ben Fransen Aug 07 '15 at 11:47
  • 5
    Caution! This can cause serious problems when you use git! If you change the current branch, all the files that changed will be uploaded because they are "external changes"! So you lose the posibility of switching between live/dev-branches. There must be another way... – ReynekeVosz Aug 28 '15 at 08:34
  • I started Using GruntJs recently, and it works fine, but external changes are not uploaded on server (and they are not even seen on the project window untill I refresh the window) Can anybody help me? – gogachinchaladze Nov 30 '15 at 07:59
  • just some things to check: do you run Grunt from WebStorm/PHPStorm, using Grunt integration, or externally? Do you have 'Synchronize files on frame or editor tab activation' option enabled? Is your project located on local disk, or on some mounted drive? Do you have any symlinks in the project path? – lena Nov 30 '15 at 14:27
  • Following the given answer you can additionally add the folder with your less files to the tab "Excluded Paths" in the deployment settings. Thus they won't be uploaded to your live installation if unnecessary. – cptstarling Jan 06 '16 at 10:59