Sha256: c3c3e1a904bc0bde98e1471990b677569ad5b397431751f4e576a6cc144c31b5
Contents?: true
Size: 943 Bytes
Versions: 1
Compression:
Stored size: 943 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'commander' require_relative '../lib/generator' require_relative './site' require_relative './mailer' require_relative './setup' require_relative './server' require_relative '../lib/product' class Application include Commander::Methods # include whatever modules you need include SiteCommand include MailCommand include ServerCommand include SetupCommand def run program :name, M2M::NAME program :version, M2M::VERSION program :description, 'Markdown to More' default_command :site #生成博客 command :site do |c| self.site(c) end #启动服务器 command :server do |c| self.server(c) end #发送邮件 command :mail do |c| self.mail(c) end #配置相关 command :setup do |c| self.setup c end run! end end Application.new.run # MyApplication.new.run if $0 == __FILE__
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
m2m-0.2.3 | exe/m2m |