Sha256: 8a2900d4f1387e68585763cfcd5bef8e44410849ba39ef213c6244f864bcfe92

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

#!/usr/bin/env ruby

require 'thor'
require 'pyro'

class PyroCLI < Thor
  
  desc 'new NAME', 'Creats a new app'
  def new(name)
    FileUtils.cp_r("#{File.dirname(__FILE__)}/../template", name)
  end

	desc 'build', 'Builds the app for production'
  def build
    Pyro.build
  end

  desc 'serve', 'Starts a Pyro app on localhost, --fast skips asset reloading'
  option :fast
  def serve
    require 'pyro/server'
    
    if options[:fast]
      PyroServer.set :fast, true
    else
      PyroServer.set :fast, false
    end
    
    PyroServer.run!
  end
  
end

PyroCLI.start(ARGV)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pyro-0.8.1 bin/pyro
pyro-0.8.0 bin/pyro