Auto-compile Jade in Webstorm on Windows

孤街浪徒 提交于 2019-11-29 07:23:54
CrazyCoder

jade --out option specifies the directory, not the file:

-O, --out <dir>    output the compiled html to <dir> 

To retain the directories structure you will have to use $FileDirPathFromParent$ macro that takes a parameter.

For example, for the C:\project\public\jade\subdir\subdir.jade file we need it to return the path right to the jade directory, that would be the parameter for the macro: $FileDirPathFromParent(jade)$, and the result would be subdir.

Now if you set the Working directory to $FileDir$, the Arguments would be:

$FileName$ --out $ProjectFileDir$\public\$FileDirPathFromParent(jade)$ 

And the complete Jade File Watcher for this specific project layout would look like this:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!