Sass 未编译
Sass not compiling
我有一个现有项目,我正在尝试将 CSS 切换到 Sass,但我很难开始工作。我按照教程 here 进行操作并且它有效,但是当我尝试在我的项目中模仿它时,它不起作用。在命令提示符下,我有 c:\main\sub\working\compass watch(这是指南针正在监视的地方)。在我的 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,在测试文件夹中有 style.css。 Compass 似乎没有找到更改,所以我确定我的设置有误,但不知道如何更改它们。
文件夹结构:
c:
\main
\sub
\working
\sass
config.rb
test.scss
\test
style.css
你说你 运行宁 c:\main\sub\working\compass watch
你需要 cd
进入 config.rb
所在的目录并且 运行 compass watch
cd c:\main\sub\working\sass
compass watch
我有一个现有项目,我正在尝试将 CSS 切换到 Sass,但我很难开始工作。我按照教程 here 进行操作并且它有效,但是当我尝试在我的项目中模仿它时,它不起作用。在命令提示符下,我有 c:\main\sub\working\compass watch(这是指南针正在监视的地方)。在我的 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,在测试文件夹中有 style.css。 Compass 似乎没有找到更改,所以我确定我的设置有误,但不知道如何更改它们。
文件夹结构:
c:
\main
\sub
\working
\sass
config.rb
test.scss
\test
style.css
你说你 运行宁 c:\main\sub\working\compass watch
你需要 cd
进入 config.rb
所在的目录并且 运行 compass watch
cd c:\main\sub\working\sass
compass watch