Method: Clementine::ClojureScriptEngine#compile

Defined in:
lib/clementine/clojurescript_engine/mri.rb,
lib/clementine/clojurescript_engine/jruby.rb

#compileObject



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/clementine/clojurescript_engine/mri.rb', line 17

def compile
  @options = default_opts.merge(Clementine.options) if Clementine.options
  begin
    cmd = %Q{#{command} #{@file} '#{convert_options(@options)}' 2>&1}
    result = `#{cmd}`
  rescue Exception
    raise Error, "compression failed: #{result || $!}"
  end
  unless $?.exitstatus.zero?
    raise Error, result
  end
  result
end