【发布时间】:2016-09-20 02:28:56
【问题描述】:
我有一个现有项目,我正在尝试将 CSS 切换到 Sass,但在开始工作时遇到了困难。我按照教程here 进行操作,它可以工作,但是当我尝试在我的项目中模仿它时,它不起作用。在命令提示符下,我有 c:\main\sub\working\compass watch (这是 compass 正在观看的地方)。在我的 config.rb 文件( ../working/sass )中,我有:
# Require any additional compass plugins here.
#Folder settings
relative_assets = true #because we're not working from the root
project_path = "c:\main\sub\working\"
css_dir = "../test" #where the CSS will saved
sass_dir = "../sass" #where our .scss files are
# You can select your preferred output style here (can be overridden via the command line):
output_style = :expanded # After dev :compressed
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = true
# Obviously
preferred_syntax = :scss
所以我在 sass 文件夹中有 test.scss,在 test 文件夹中有 style.css。 Compass 似乎没有找到更改,所以我确定我的设置有误,但不知道如何更改它们。
文件夹结构:
c:
\main
\sub
\working
\sass
config.rb
test.scss
\test
style.css
【问题讨论】: