Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (21 sloc) 0.742 kB
#!/usr/bin/env ruby
require File.expand_path(File.dirname(__FILE__) + "/../lib/stasis")
Stasis::Gems.activate %w(slop)
require 'slop'
opts = Slop.parse :help => true do
on :b, :beanstalk, "Beanstalk addresses\t\t(comma-separated, default: localhost:11300)", :optional => true, :as => Array, :default => "localhost:11300"
on :d, :development, "Development mode\t\t(auto-regenerate)"
on :o, :only, "Only generate specific files\t(comma-separated)", :as => Array
end
args = []
opts.parse { |arg| args << arg }
dir = args.first || Dir.pwd
if opts.development?
Stasis::Auto.new(dir)
elsif opts.only?
Stasis.new(dir).generate(:only => opts[:only])
elsif opts.beanstalk?
Stasis::Daemon.new(opts)
else
Stasis.new(dir).generate
end
Jump to Line
Something went wrong with that request. Please try again.