Changing the output directory of the resulting CSS file in Compass/Webby?

爱⌒轻易说出口 提交于 2019-12-07 06:57:48

问题


I want my resulting *.css file to land in the output/css directory instead of the stylesheets directory. How would I go about doing this?

I've already tried:

Compass.configuration do |config|
  config.project_path = File.dirname(__FILE__)
  config.sass_dir = File.join('src','stylesheets')
  config.css_dir = 'css'
  config.output_style = :compact
end

<proj-root>/SiteFile

In my Webby SiteFile configuration, but the resulting css file is still output into the default directory ("stylesheets"). How can I change this?


回答1:


Try adding the path you wish to use to your config.rb file like this;

css_dir = "output/folder/css/"

A real world example from my own project looks like this:

css_dir = "public/stylesheets/compiled/"



回答2:


I haven't tried it but this might work:

config.css_dir = File.join('output','css')


来源:https://stackoverflow.com/questions/1597368/changing-the-output-directory-of-the-resulting-css-file-in-compass-webby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!