Sha256: 2dbc6ea8ce41d9018fd55ab679b9067dc1b341aa05d892a3b403f67264e6d2a2
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 KB
Contents
#!/usr/bin/env ruby require 'gentheme' require 'slop' opts = Slop::Options.new opts.banner = "Usage: gentheme [options] command" opts.separator "" opts.separator "Commands:" opts.separator "" opts.separator "\tinstall themename: start installing a theme inside a folder named themename" opts.separator "" opts.separator "Available options:" opts.string "-p", "--path", "a path", default: `pwd`.strip opts.bool "-v", "--verbose", "enable verbose mode", default: true opts.on '--version', 'print the version' do puts Gentheme::VERSION exit end parser = Slop::Parser.new(opts) options = parser.parse(ARGV) command = options.arguments[0] rescue nil if command.nil? puts options.to_hash puts options.arguments puts opts exit end case command when "install" themename = options.arguments[1] rescue nil if !themename.nil? generator = Gentheme::Generator.new(themename, options) generator.start $stderr.puts "Generated new WP Theme structure for #{generator.name}" else puts "Please specify a name for your Wordpress Theme" puts "example:" puts "gentheme install mythemename" end else puts "Unknown command" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gentheme-0.1.2 | bin/gentheme |
gentheme-0.1.1 | bin/gentheme |
gentheme-0.1.0 | bin/gentheme |