Implement assetpack for Sinatra

This commit is contained in:
Gregory Eremin
2013-07-12 17:40:26 +07:00
parent 9b1df758cf
commit ce91297ee0
17 changed files with 73 additions and 433 deletions
@@ -0,0 +1,11 @@
module Sinatra::AssetPack
class StylusEngine < Engine
def css(str, options={})
Tilt.new("stylus", {:style => :compressed}) { str }.render
rescue LoadError
nil
end
end
Compressor.register :css, :stylus, StylusEngine
end