Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to combine compass with bless?

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

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)

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

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

like image 240
Gianluca Guarini Avatar asked Nov 06 '12 21:11

Gianluca Guarini


2 Answers

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

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

after you have installed Bless.

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

like image 116
Julian Xhokaxhiu Avatar answered Nov 07 '22 19:11

Julian Xhokaxhiu


This works for the regular compile command, but it doesn't work when you watch it. After Bless is completed the watch process ends.

like image 32
imsoper Avatar answered Nov 07 '22 20:11

imsoper