Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 548 Bytes
require 'jsmin'
require 'tempfile'
require 'bistro_car/bundle'
require 'bistro_car/helpers'
module BistroCar
VERSION = "0.2.2"
if defined?(Rails::Engine)
class Engine < Rails::Engine
engine_name :bistro_car
end
end
class << self
def compile(source)
file = Tempfile.new('script.coffee')
file.write(source)
file.close
%x(coffee -p #{file.path})
end
attr_accessor :mode, :minify
end
end
BistroCar.mode = :bundled
BistroCar.minify = true if defined?(Rails) and Rails.env.production?
Jump to Line
Something went wrong with that request. Please try again.