2011-07-27 06:06:24 +02:00
|
|
|
#!/usr/bin/env ruby
|
2011-07-27 08:19:43 +02:00
|
|
|
|
2012-07-19 07:10:02 +02:00
|
|
|
require 'middleman-core/profiling'
|
|
|
|
if ARGV.include? '--profile'
|
|
|
|
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new
|
|
|
|
end
|
|
|
|
Middleman::Profiling.start
|
|
|
|
|
2012-07-17 02:24:13 +02:00
|
|
|
require "middleman-core/load_paths"
|
|
|
|
Middleman.setup_load_paths
|
2012-05-24 20:03:58 +02:00
|
|
|
|
2014-01-03 01:34:08 +01:00
|
|
|
require "middleman-cli"
|
2012-05-26 23:15:36 +02:00
|
|
|
|
2012-07-17 02:24:13 +02:00
|
|
|
# Change directory to the root
|
|
|
|
Dir.chdir(ENV["MM_ROOT"]) if ENV["MM_ROOT"]
|
2011-12-29 07:52:51 +01:00
|
|
|
|
2012-05-24 20:03:58 +02:00
|
|
|
# Start the CLI
|
2012-07-19 07:10:02 +02:00
|
|
|
Middleman::Cli::Base.start
|