Class: Rocket::JS::CLI

Inherits:
Optitron::CLI
  • Object
show all
Defined in:
lib/rocket/js/cli.rb

Instance Method Summary collapse

Instance Method Details

#generate(dest = "./") ⇒ Object



14
15
16
17
18
19
20
# File 'lib/rocket/js/cli.rb', line 14

def generate(dest="./")
  Rocket::JS::Builder.new(dest, !params[:unminified]).generate
  puts "Newly generated Rocket files has been placed in #{dest}"
rescue => ex
  puts ex.to_s
  exit(1)
end

#versionObject



8
9
10
# File 'lib/rocket/js/cli.rb', line 8

def version
  puts "Rocket javascript library v#{Rocket.version}"
end