Sha256: 6a071ecae18f5b40eb4afadac8bcc79d97adf1dc5d7cd59318e89f0837a1cac6

Contents?: true

Size: 396 Bytes

Versions: 1

Compression:

Stored size: 396 Bytes

Contents

#!/usr/bin/env ruby

require 'minjs'

argv = ARGV.dup
f = []
options = {}
argv.each do |x|
  if x.match(/^--?version/)
    puts Minjs::VERSION
    exit(0)
  elsif x.match(/^--?/)
    opt = $'.gsub(/-/, '_').to_sym
    options[opt] = true
  else
    f.push(open(x.to_s).read())
  end
end

prog = Minjs::Compressor.new(:debug => false)
prog.compress(f.join("\n"), options)
puts prog.to_js(options)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minjs-0.3.0 exe/minjs