0

I'm using pug/jade watcher with the following "Output paths to refresh": $ProjectFileDir$\html\$FileNameWithoutExtension$.html. This should save the output in /html but for some reason it saves it next to the jade file.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
JordyvD
  • 1,565
  • 1
  • 18
  • 45
  • 1
    *"this should save the output in /html"* **Nope.** https://www.jetbrains.com/help/phpstorm/2016.2/using-file-watchers.html?search=file%20watcher#transpilerBehaviour -- check #6 -- *"Please note, that changing the value in this text box does not make the transpiler store its output in another location. To do that, specify the desired output location in the Arguments text box. "* – LazyOne Aug 02 '16 at 13:40
  • "Click the Insert Macro button to open the Macros dialog box, where you can select the desired pattern from the list." -- this doesn't work either – JordyvD Aug 02 '16 at 13:47
  • https://confluence.jetbrains.com/display/PhpStorm/File+Watchers+in+PhpStorm – LazyOne Aug 02 '16 at 13:52
  • Btw; adding `$FileName$ --pretty -p $FileParentDir$` to arguments doesn't do anything either – JordyvD Aug 02 '16 at 14:11
  • 1
    I'm not using Jade/Pug myself so cannot give you precise instructions. All parameters should be taken `--help` or alike output of the tool that you are using. File Watcher is just a mechanism of launching such tool (with parameters) when file gets saved in IDE -- nothing more. You can enable "Show console: always" and see what command will be executed. You can also run that (or your own) command in terminal and see how it works with this or that parameter. And once you are happy with the results -- transfer you parameters into File Watcher setting. – LazyOne Aug 02 '16 at 14:26

1 Answers1

1

You need changing Jade watcher arguments accordingly:

Arguments: $FileName$  --pretty --out $ProjectFileDir$/html
Working directory: $FileDir$
Output paths to refresh: $ProjectFileDir$/html/$FileNameWithoutExtension$.html
lena
  • 90,154
  • 11
  • 145
  • 150