1
我的scss文件位于project/repo/style/home/index.scss
中,并希望将编译后的css文件保存在project/repo/dist/style/home/index.css
中,但找不到任何好的解决方案。如何在PhpStorm文件观察器中编写自定义输出路径
如何做到这一点?
我的scss文件位于project/repo/style/home/index.scss
中,并希望将编译后的css文件保存在project/repo/dist/style/home/index.css
中,但找不到任何好的解决方案。如何在PhpStorm文件观察器中编写自定义输出路径
如何做到这一点?
我找到了答案: 安装红宝石和sass后需要重启系统。
Webstorm配置了以下参数:
Program: /usr/bin/sass
Arguments: --no-cache --style compressed --update --sourcemap=none $FileName$:$ProjectFileDir$/repo/Style/$FileDirPathFromParent(Style)$/$FileNameWithoutExtension$.min.css
Working directory: $FileDir$
Output path:$ProjectFileDir$/repo/Style/$FileDirPathFromParent(Style)$/$FileNameWithoutExtension$.css
- 风格压缩集缩小&--sourcemap = none禁用源地图。可以删除。 –
看一看这个评论/线程,例如:https://intellij-support.jetbrains.com/hc/en-us/community/帖子/ 206347569 /评论/ 207385679 – LazyOne
另请参阅https://stackoverflow.com/questions/29096157/webstorm-scss-file-watcher-does-not-respect-parent-directory/29096837#29096837 – lena