Sass / Compass编译到许多位置 [英] Sass/Compass compile into many locations

查看:59
本文介绍了Sass / Compass编译到许多位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Sass 3.1.10与Compass 0.11.5结合使用。由于某些结构上的原因,我需要将我的罗盘项目编译到许多不同的位置(css_dir)。目前,我手动编译每个路径的所有文件。有没有办法同时编译到多个位置?

I'm using Sass 3.1.10 with Compass 0.11.5. I need to compile my compass project into many diffrent locations (css_dir) due some structural reasons. Currently I compile all files for each path by hand. Is there a way to compile into many locations at the same time?

我的config.rb看起来像这样:

my config.rb looks like this:

http_path = "/"

css_dir = "skin/main/css"
#css_dir = "uc/main/css"
#css_dir = "skin/abstract/css"
#css_dir = "skin/ksv/css"

sass_dir = "sass"


images_dir = "images"
javascripts_dir = "javascripts"

output_style = :compressed

preferred_syntax = :sass


推荐答案

我写了一个简单的shell脚本来编译到给定的路径:

I wrote a simple shell script to compile to a given path:

echo "* Compiling all CSS"


echo "***** START";
cd /mainworkspace/www/

echo "***** compiling into skin1";
compass compile --time --css-dir=skin1/main/css --output-style compressed --force;

echo "***** compiling into skin2";
compass compile --time --css-dir=skin2/main/css --output-style compressed --force;

echo "***** compiling into uc skin";
compass compile --time --css-dir=uc/main/css --output-style compressed --force;


echo "***** END";

更新:
添加了一些生产参数。在这里您可以找到许多其他可选的参数: http://compass-style.org/help / documentation / configuration-reference /

这篇关于Sass / Compass编译到许多位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆