2014-04-29 11:43:05 -07:00
|
|
|
# rubocop:disable FileName
|
|
|
|
|
2014-01-02 16:34:08 -08:00
|
|
|
# Setup our load paths
|
|
|
|
libdir = File.expand_path(File.dirname(__FILE__))
|
|
|
|
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
|
|
|
|
2014-01-09 19:49:41 -08:00
|
|
|
# Require Thor since that's what the whole CLI is built around
|
2011-07-26 21:06:10 -07:00
|
|
|
require 'thor'
|
|
|
|
|
2011-12-21 11:03:45 -08:00
|
|
|
# CLI Module
|
2015-01-04 14:23:35 -06:00
|
|
|
module Middleman::Cli
|
|
|
|
# The base task from which everything else extends
|
|
|
|
class Base < ::Thor
|
|
|
|
desc 'version', 'Show version'
|
|
|
|
def version
|
|
|
|
say "Middleman #{Middleman::VERSION}"
|
|
|
|
end
|
2012-08-13 15:39:06 -07:00
|
|
|
|
2015-01-04 14:23:35 -06:00
|
|
|
def self.exit_on_failure?
|
|
|
|
true
|
2011-12-21 12:13:28 -08:00
|
|
|
end
|
2011-07-26 21:06:10 -07:00
|
|
|
end
|
2011-12-13 23:58:34 -08:00
|
|
|
end
|
2011-12-21 11:03:45 -08:00
|
|
|
|
2014-04-07 16:15:50 +02:00
|
|
|
# Require the Middleman version
|
|
|
|
require 'middleman-core/version'
|
|
|
|
|
2011-12-28 22:52:51 -08:00
|
|
|
# Include the core CLI items
|
2014-01-02 16:34:08 -08:00
|
|
|
require 'middleman-cli/init'
|
|
|
|
require 'middleman-cli/extension'
|
|
|
|
require 'middleman-cli/server'
|
|
|
|
require 'middleman-cli/build'
|
2014-01-09 19:49:41 -08:00
|
|
|
require 'middleman-cli/console'
|
2015-08-17 10:48:56 -07:00
|
|
|
require 'middleman-cli/config'
|