Sha256: 80048fce892d0c9340b123494e1857c74be208e60de33f7c4d5ca96803263cd6
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path('../../lib/guinness', __FILE__) cmd = ARGV[0] || 'drink' dir = ARGV[1] || '_source' puts "#{Guinness::EMOJI} Guinness : App root is: '#{dir}'" case cmd when 'new' require 'fileutils' File.open(File.join(FileUtils.mkpath(dir), 'index.html'), 'w') do |f| f.puts 'Cheers from Guinness!' end when 'build', 'drink' abort "#{Guinness::EMOJI} Guinness : Unable to locate: '#{dir}'" unless Dir.exists?(dir) @app = Guinness::Application.new(root: dir) @app.send cmd else puts "'#{cmd}' is not a valid guinness command" puts 'Usage: guinness (build,drink,new) <directory>' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
guinness-0.0.2 | bin/guinness |