2011-03-16 58 views

回答

1

是的!

如果您使用Compass,那麼您將擁有一個如下所示的文件/config/compass.rb。在這裏,我有在app /樣式我SASS文件,並在TMP /樣式儲蓄編譯(幫助Heroku的部署)

/config/compass.rb

# This configuration file works with both the Compass command line tool and within Rails. 
# Require any additional compass plugins here. 
project_type = :rails 
project_path = Compass::AppIntegration::Rails.root 
#project_path = RAILS_ROOT if defined?(RAILS_ROOT) 
# Set this to the root of your project when deployed: 
http_path = "/" 
css_dir = "tmp/stylesheets" 
sass_dir = "app/stylesheets" 
environment = Compass::AppIntegration::Rails.env 
# To enable relative paths to assets via compass helper functions. Uncomment: 
# relative_assets = true 
+0

任何想法如何做到這一點,沒有指南針? – 2011-03-16 20:50:39

+0

@Alex - 您可以使用sasswatch並手動將文件從一個文件直接複製到公共/樣式表。 – 2011-03-16 20:52:24

+0

謝謝傑西,這正是我一直在尋找的! – 2011-03-17 00:02:05

0

老問題,但它實際上是簡單做,你只需將目錄傳遞給sass而不是特定的.scss就好了;

青菜--watch /位置/到/你/ SCSS /:/位置/到/你/ CSS

然後SCSS的任何更改將被保存到你的CSS目錄中,它也將遵循同樣的結構你的scss目錄。

相關問題