mirageglobe
mirageglobe

Reputation: 3104

How to uglify coffeescript in a sinatra app?

Using coffeescript in sinatra. With the following code. it is able to return and compile coffeescript as js on the fly. Is there a good way to uglifying the result before coffee spits it out? Hope the question is clear

get "/coffee/*.js" do
    filename = params[:splat].first
    coffee "../public/coffee/#{filename}".to_sym
end

Upvotes: 1

Views: 254

Answers (1)

Patrick Oscity
Patrick Oscity

Reputation: 54684

I guess sinatra-assetpack will do the trick.

Upvotes: 2

Related Questions