lib/clementine/clojurescript_engine/jruby.rb in clementine-0.0.2 vs lib/clementine/clojurescript_engine/jruby.rb in clementine-0.0.3
- old
+ new
@@ -17,20 +17,19 @@
@file = file
@options = options
end
def compile
- @options = Clementine.options if @options.empty?
+ @options = default_opts.merge(Clementine.options) if Clementine.options
cl_opts = PersistentHashMap.create(convert_options(@options))
RT.loadResourceScript("cljs/closure.clj")
builder = RT.var("cljs.closure", "build")
builder.invoke(@file, cl_opts)
end
#private
def convert_options(options)
opts = {}
- options = options.empty? ? default_opts : options
options.each do |k, v|
cl_key = Keyword.intern(Clementine.ruby2clj(k.to_s))
case
when (v.kind_of? Symbol)
cl_value = Keyword.intern(Clementine.ruby2clj(v.to_s))