2016-09-19 88 views
0

我有一個現有的項目,我試圖將CSS切換到Sass,但是無法開始工作。我按照教程here,它的工作原理,但是當我嘗試在我的項目中模仿它,它不起作用。在命令提示符中,我有c:\ main \ sub \ working \羅盤監視(這是指南針正在監視的位置)。在我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和style.css文件test.scss。指南針似乎沒有找到變化,所以我確定我的設置錯了,但無法弄清楚如何改變它們。

文件夾結構:

c: 
\main 
    \sub 
    \working 
    \sass 
     config.rb 
     test.scss 
    \test 
     style.css 

回答

1

你說你正在運行c:\main\sub\working\compass watch你需要cd到其中config.rb是目錄,然後運行compass watch

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

是的這個工作的感謝 – Keith