middleman/bin/mm-server

19 lines
417 B
Text
Raw Normal View History

2009-07-28 01:25:32 +02:00
#!/usr/bin/env ruby
2009-10-01 23:26:39 +02:00
require 'optparse'
2009-07-28 01:25:32 +02:00
# Require Middleman
require File.join(File.dirname(__FILE__), '..', 'lib', 'middleman')
2009-10-01 23:26:39 +02:00
class Middleman::Base
set :root, Dir.pwd
OptionParser.new { |op|
op.on('-e env') { |val| set :environment, val.to_sym }
op.on('-s server') { |val| set :server, val }
op.on('-p port') { |val| set :port, val.to_i }
}.parse!(ARGV.dup)
# Start Middleman
run!
end