PHPStorm: How do I setup LESS to output to CSS directory with file watcher?

后端 未结 6 502
误落风尘
误落风尘 2020-12-09 09:30

How do, using File Watchers in PHPStorm do I set up LESS file watchers output path to do this:

I want:

/project/path/less/dir/file.less

to output to:

6条回答
  •  抹茶落季
    2020-12-09 09:35

    See my related answer for JADE file watcher, I believe it would be the same for LESS.

    The trick is to use $FileDirPathFromParent(dir)$ macro:

    $ProjectFileDir$/css/$FileDirPathFromParent(less)$ will produce /project/path/css/dir/ for a file located in /project/path/less/dir/ directory.

提交回复
热议问题