[ Gemspec ]
This commit is contained in:
parent
7085e69bb6
commit
8dfb642c84
6 changed files with 52 additions and 3 deletions
35
bin/tonton-web
Normal file
35
bin/tonton-web
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#! /usr/bin/ruby
|
||||
|
||||
require 'sod'
|
||||
|
||||
class New < Sod::Action
|
||||
on "--new", argument: "NAME"
|
||||
|
||||
def call(name)
|
||||
destination_root = Pathname.new name
|
||||
|
||||
destination_root.mkdir
|
||||
|
||||
(destination_root+'modules').mkdir
|
||||
|
||||
gem_root = Pathname.new(__FILE__).parent + '..'
|
||||
|
||||
for source in gem_root.glob('{example/*,*.md}')
|
||||
destination = destination_root + source.basename
|
||||
|
||||
`cp #{source} #{destination}`
|
||||
end
|
||||
|
||||
(destination_root+'views').mkdir
|
||||
|
||||
`cp -r #{gem_root+'views'} #{destination_root}`
|
||||
end
|
||||
end
|
||||
|
||||
cli = Sod.new(banner: "TonTon Web 0.0.0: TonTon utilitary for web apps") do
|
||||
on(New)
|
||||
|
||||
on Sod::Prefabs::Actions::Help, self
|
||||
end
|
||||
|
||||
cli.call
|
||||
Loading…
Add table
Add a link
Reference in a new issue