无法在Webstorm中运行SASS

时间:2014-05-26 08:12:28

标签: sass webstorm

我刚刚使用Ruby Gems安装了Sass,虽然我的项目是在Webstorm的NodeJS中。在Webstorm中启用SASS文件观察程序。当我从命令行运行“sass styles.scss”时,我得到一个.sass-cache文件夹,但不是实际编译的CSS文件。 Webstorm在我的SASS文件中没有显示任何错误。我需要将文件编译为.css文件。

我也试图在Webstorm中设置一个不编译scss文件的filewatcher。我在Webstorm的filewatcher中的SCSS可执行文件路径就是这样。 C:\ Ruby200-64 \ BIN \ sass.bat

以下是filewatcher设置。

enter image description here

Webstorm在控制台中显示的错误,当保存.scss文件时(应该触发文件观察器),是这样的:

C:/Ruby200-x64/bin/sass.bat --no-cache --update styles.scss:styles.css
'"ruby.exe"' is not recognized as an internal or external command,
operable program or batch file.

文件观察者的完整参数无法在上图中完全看到:

--no-cache --update $FileName$:$FileNameWithoutExtension$.css

1 个答案:

答案 0 :(得分:3)

这是:

enter image description here

没有计算但是从上到下,

  1. 选择您的观察者,您可以为各种情况制作预设(也许尝试制作一个新的)
  2. 我的32位sass.bat的路径(不是100%肯定,但我认为即使是scss.bat也有效)
  3. 输出,你可以在下面的截图中看到它应该如何工作/看起来。
  4. enter image description here