I need a Compass hook after compiler compile all SCSS files to CSS in STANDALONE (no Rails) project.
Is there any post-compile hook in compass other than editing "compiler.rb" (which is not good solution, because of gem updates)?
Ok I found it ;) Compass has this hooks:
Sad, that on http://compass-style.org/ there is no info about any hook.
The Compass callbacks are documented in the Callbacks section of http://compass-style.org/help/documentation/configuration-reference/#callbacks.
The on_stylesheet_saved hook will fire after a .css file is compiled. You can invoke it by adding the following to the bottom of your config.rb file:
on_stylesheet_saved do |file|
#Do Ruby stuff. Below outputs to command line.
puts ">>>> ZOMG"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With