middleman/middleman-core/bin/middleman

19 lines
597 B
Plaintext
Raw Normal View History

#!/usr/bin/env ruby
2011-12-29 07:52:51 +01:00
# Add our lib/ directory to the path
libdir = File.expand_path(File.join(File.dirname(File.dirname(__FILE__)), "lib"))
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
moredir = File.expand_path(File.join(File.dirname(File.dirname(libdir)), "middleman-more", "lib", "middleman-more"))
$LOAD_PATH.unshift(moredir) unless $LOAD_PATH.include?(moredir)
require "middleman-core/load_paths"
Middleman.setup_load_paths
require "middleman-core/cli"
# Change directory to the root
Dir.chdir(ENV["MM_ROOT"]) if ENV["MM_ROOT"]
2011-12-29 07:52:51 +01:00
# Start the CLI
Middleman::Cli::Base.start