如何结合罗盘与祝福? [英] How to combine compass with bless?

查看:212
本文介绍了如何结合罗盘与祝福?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行Compass项目,最终的CSS输出非常庞大,因此需要祝福

I am working on a Compass project and my final css output is huge so it needs to be be blessed .

我使用Codekit编译我的SCSS文件,它有更少和sass文件的bless选项,但不幸的是这个选项似乎不适用于罗盘项目(BTW没有解决问题的解决方法 https://github.com/bdkjones/CodeKit/issues / 163

I am using Codekit to compile my SCSS files, and it has the bless option for the less and sass files but unluckly this option seems to be not available for the compass projects (BTW there is no workaround to fix the problem https://github.com/bdkjones/CodeKit/issues/163)

在编译过程之后有没有其他方法可以自动执行?是否可以用nodejs观察css文件,然后保存它?

Is there an alternative way to do that automatically after the compiling process? Is it possible to watch the css file with nodejs and then bless it?

==================== ==============================

====================================================

UPDATE

我不再使用Codekit了,我使用Grunt建立项目资源,它的工作方式很像一个魅力。

I am not using Codekit anymore I use Grunt to build the project assets and it works like a charm.

推荐答案

好吧,看来使用这个参考你可以简单地做一些事情:

Well, it seems that using this reference you can simply do something like:

on_stylesheet_saved do |filename|
    system('blessc ' + File.basename(filename))
end

您已安装祝福

它是什么只需在编译Compass文件后附加该事件:)享受

What it does is simply attaching that event after you compile your Compass file :) Enjoy

这篇关于如何结合罗盘与祝福?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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