Sha256: 97b03807c967bad6e0f21d48a29a334c3738249ede43c48b995ef6cf7688d642
Contents?: true
Size: 756 Bytes
Versions: 1
Compression:
Stored size: 756 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 DIR', 'Builds an app for production' def build(dir = '.') Pyro.build('production', false, dir) end desc 'serve DIR', 'Starts a Pyro app on localhost, --fast skips asset reloading' option :fast def serve(dir = '.') require 'pyro/server' PyroServer.set :src_folder, dir PyroServer.set :public_folder, "#{PyroServer.settings.src_folder}/builds/development" if options[:fast] PyroServer.set :fast, true else PyroServer.set :fast, false end PyroServer.run! end end PyroCLI.start(ARGV)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pyro-0.8.2 | bin/pyro |