class NodeUglify

Constants

VERSION

Public Instance Methods

compress(input) click to toggle source
# File lib/node_uglify.rb, line 5
def compress(input)
  output = ''
  Open3.popen3('uglifyjs') do |i, o, t|
    i.puts input
    i.close
    while line = o.gets
      output += line
    end
  end
  output
end