【问题标题】:Sass not compilingSass 没有编译
【发布时间】: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

【问题讨论】:

    标签: css ruby sass compass


    【解决方案1】:

    您说您正在运行c:\main\sub\working\compass watch,您需要将cd 进入config.rb 所在的目录并运行compass watch

    cd c:\main\sub\working\sass
    compass watch
    

    【讨论】:

      猜你喜欢
      • 2017-08-28
      • 2017-11-10
      • 1970-01-01
      • 1970-01-01
      • 2015-12-08
      • 1970-01-01
      • 2018-09-30
      • 2016-02-28
      • 2015-07-30
      相关资源
      最近更新 更多