用于 webstorm 的 Sass 文件观察器 [英] Sass filewatcher for webstorm

查看:49
本文介绍了用于 webstorm 的 Sass 文件观察器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 NodeJS 项目中使用 sass,这是我与 nodejs 一起安装的库

for Win,

  • 使用 gem install sass
  • 通过命令提示符安装 Sass
  • 在 Web/Phpstorm 中,将程序"路径放入 sass.bat(还记得 node-sass.cmd 吗?),例如C:\Ruby200\bin\sass.bat
  • I am trying to use sass in a NodeJS project and this is the library I installed with nodejs

    https://www.npmjs.org/package/node-sass

    I am using webstorm for this project and I can't get the Sass file watcher to work.

    Even after I save the filewatcher and click "Ok", the filewatcher does not work. When I open the settings to check what's wrong the filewatcher has been unchecked. Here are the filewatcher settings:

    The node-sass module is installed as a global module so the node-sass command works.

    解决方案

    Most definitely path to .cmd is wrong as lena and lazy one suggested. Whenever watcher unchecks in Web/Phpstorm its probably because of invalid path. If you still have trouble with node-sass you could always go Ruby way.

    1. Download and install Ruby for Win,
    2. Install Sass via command prompt with gem install sass,
    3. In Web/Phpstorm put "Program" path to sass.bat (remember node-sass.cmd?), e.g. C:\Ruby200\bin\sass.bat

    这篇关于用于 webstorm 的 Sass 文件观察器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆