Tokens/Macros in File Watchers Configuration


    The File Watcher dialog shows different settings among what "Arguments", "Working Directory", and "Output paths to refresh". Their default values contain tokens with $ signs and I'm wondering how those are actually defined and if they could be tweaked.

    Let's say I have a folder "source/front-end/assets/styles" where I have SCSS files that I want to compile into CSS in the following folder: "distribution/front-end/assets/styles". How can I manage to do that with those "macros"?



Comment actions Permalink

Tokens with '$' are macros. You can see the full list by pressing 'Insert macro' button.
For SCSS file watcher, you can try the following arguments:

Arguments: --no-cache --update $FileName$:$ProjectFileDir$/distribution/front-end/assets/styles/$FileNameWithoutExtension$.css
Working dir: $FileDir$
Output paths to refresh: distribution/front-end/assets/styles/$FileNameWithoutExtension$.css

Comment actions Permalink

Yes, I guessed that they were somehow macros but I find it hard to understand how they actually work - unless I had my eyes only half open yesterday... ;)

In the meantime I figured out the way to do what I wanted with the following expression : "$ProjectFileDir$/distribution/$FileDirPathFromParent(source)$/$FileNameWithoutExtension$.css".



Please sign in to leave a comment.