Sha256: 85120df48351a77880feb7c561f2f1bf954c7d557344fc6bf2ff5644316c1bac
Contents?: true
Size: 1.66 KB
Versions: 9
Compression:
Stored size: 1.66 KB
Contents
#! /usr/bin/env ruby $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require 'optparse' require 'esvg' options = { core: false, fingerprint: false, cli: true } OptionParser.new do |opts| opts.on("-o", "--output PATH", String, "Where should JS/HTML files be written, (default: current directory)") do |path| options[:build] = path end opts.on("-c", "--config PATH", String, "Path to a config file (default: esvg.yml, config/esvg.yml)") do |path| options[:config_file] = path end opts.on("-b", "--build", String, "Append a build version, (-b 1.2.3 -> svgs-1.2.3.js)") do |version| options[:version] = version end opts.on("-f", "--fingerprint", "Fingerprint the build files") do options[:fingerprint] = true end opts.on("-C", "--core", "Write _esvg.js core javascript, Small utlities for working with svg embed") do options[:core] = true end opts.on("-r", "--rails", "Use Rails defaults") do options[:rails] = true end opts.on("-O", "--optimize", "Optimize svgs with svgo") do options[:optimize] = true end opts.on("-z", "--gzip", "Write gzip compressed output") do options[:gzip] = true end opts.on("--seed", "Seed cache file with optimized svgs") do options[:seed] = true end opts.on("-v", "--version", "Print version") do options[:version] = true end opts.on("--test", "test func") do options[:test] = true end end.parse! if options[:version] puts "Esvg #{Esvg::VERSION}" else if path = ARGV.shift options[:source] = path end options[:print] = true if options[:seed] Esvg.seed_cache(options) else esvg = Esvg.new(options).build end end
Version data entries
9 entries across 9 versions & 1 rubygems
Version | Path |
---|---|
esvg-4.6.11 | exe/esvg |
esvg-4.6.10 | exe/esvg |
esvg-4.6.9 | exe/esvg |
esvg-4.6.8 | exe/esvg |
esvg-4.6.7 | exe/esvg |
esvg-4.6.6 | exe/esvg |
esvg-4.6.5 | exe/esvg |
esvg-4.6.4 | exe/esvg |
esvg-4.6.3 | exe/esvg |