Sha256: e693ed7d27ec02f2817b6530c19d04a3910e9914240a918fbd5c1943ba9baf48
Contents?: true
Size: 967 Bytes
Versions: 2
Compression:
Stored size: 967 Bytes
Contents
#!/usr/bin/env ruby # -*- coding: utf-8 -*- 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
m2m-0.2.8 | exe/m2m |
m2m-0.2.7 | exe/m2m |