Sha256: e7a02b51b338110f8097bcc8253abf4ce3dcd163270ac1f8a641747c26a4adda
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'optparse' $:.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'svelte' help =<<-EOS.gsub(/^\s*\|/, '').chomp | |svelte-ruby |------------------------------------------ | Ruby Gem wrapper for the Svelte compiler | Gem #{Svelte::VERSION} | JS #{Svelte::VERSION_JS} EOS ARGV << '-h' if ARGV.empty? options = {} parser = OptionParser.new do |opts| opts.banner = help + "\n\n usage: svelte [options]" opts.on('-f', '--format format', 'Format') do |format| options[:format] = format; end opts.on('-g', '--global global', 'Global') do |global| options[:global] = global; end opts.on('-i', '--input input', 'Input') do |input| options[:input] = input; end opts.on('-m', '--sourcemap sourcemap', 'Sourcemap') do |sourcemap| options[:sourcemap] = sourcemap; end opts.on('-n', '--name name', 'Name') do |name| options[:name] = name; end opts.on('-o', '--output output', 'Output') do |output| options[:output] = output; end opts.on('-d', '--dev dev', 'Dev') do |dev| options[:dev] = dev; end opts.on_tail("-h", "--help", "Show this message") do puts opts puts puts exit end end parser.parse! p options
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
svelte-ruby-0.1.0 | bin/svelte |