SASS --windows 8.1 上的watch 问题 [英] SASS --watch issue on windows 8.1
问题描述
我在使用 SASS 时遇到了一些问题.更新.scss
文件后,.css
文件不会更新.
I've got some issues with SASS. After updating the .scss
file, the .css
file won't update.
假设这是我的文件夹结构:
Lets say that this is my folder structure:
-scss
-style.scss
-css
-style.css
index.html
我在 cmd 的项目根目录中使用这个命令:
And I'm using this command from project root in cmd:
sass --watch scss/style.scss:css/style.css --style compressed
它第一次编译它,但是当我在 .scss
文件中进行一些更改时,它不会更新.
It compiles it the first time, but when I make some changes in the .scss
file, it doesn't update.
我正在使用:
win 8.1 64bit
ruby 2.0.0p481 64bit
Sass 3.4.2
如何让它监听更新?还是我做错了什么?
How to make it watch for updates? Or am I doing something wrong?
谢谢
更新:在 ubuntu 14.04 上测试了同样的东西,它工作得很好(但是,在 ubuntu 上我安装了最新版本的 ruby - ruby 2.1.2p95)
Update: Tested the same thing on ubuntu 14.04 and it works just fine (however, on ubuntu I've installed the latest version of ruby - ruby 2.1.2p95 )
更新 2:GitHub 上的问题
推荐答案
这是 Sass 3.4.2 中的一个错误:https://github.com/sass/sass/issues/1409
This was a bug in Sass 3.4.2: https://github.com/sass/sass/issues/1409
它在 Sass 3.4.3 中得到修复:http://sass-lang.com/documentation/file.SASS_CHANGELOG.html#343_4_september_2014
It was fixed in Sass 3.4.3: http://sass-lang.com/documentation/file.SASS_CHANGELOG.html#343_4_september_2014
如果您使用的是 Bundler,请确保您的 Gemfile
中的 Sass 版本不限于 3.4.2
.推荐的行是 gem 'sass', '~>3.4.3'
.在项目根目录中运行 bundle update
.
If you're using Bundler, make sure your Sass version is not restricted to 3.4.2
in your Gemfile
. Recommended line is gem 'sass', '~> 3.4.3'
. The run bundle update
within your project root.
如果您不使用 Bundler,只需运行 gem update sass
.
If you're not using Bundler, simply run gem update sass
.
这篇关于SASS --windows 8.1 上的watch 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!