Sha256: 7521fb6fd24a91257961d07127a995acb3ab2730791d67ee9b8d5b15dd937c7d
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 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: Dir.getwd 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 "Gentheme version #{Gentheme::VERSION}" puts "Current working directory: #{Dir.getwd}" 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.5 | bin/gentheme |
gentheme-0.1.4 | bin/gentheme |
gentheme-0.1.3 | bin/gentheme |