Sha256: 313c22482b5ab50834cdb54df553b827e022f0726fb3569fa515c3c9118486b7
Contents?: true
Size: 806 Bytes
Versions: 13
Compression:
Stored size: 806 Bytes
Contents
require 'pieces' require 'thor' module Pieces class CLI < Thor desc 'init DIR', 'create new pieces app in DIR' def init(path = '.') print "Placing new pieces in #{path}... " Pieces::Generator.init(path: path) puts 'done.' end desc 'build DIR', 'build pieces in DIR' def build(path = '.') print "Building pieces into #{path}... " Pieces::Builder.build(path: path) puts 'done.' end map %w(s) => :server desc 'server DIR', 'serve application in DIR' def server(path = Dir.pwd) puts "Serving pieces from #{path}/build... " Pieces::Server.start(path: path) end map %w(--version -v) => :version desc '--version', 'get pieces version' def version puts "pieces v#{Pieces::VERSION}" end end end
Version data entries
13 entries across 13 versions & 1 rubygems