1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-cli/lib/middleman-cli.rb

34 lines
768 B
Ruby
Raw Normal View History

2014-04-29 14:43:05 -04:00
# rubocop:disable FileName
2014-01-02 19:34:08 -05:00
# Setup our load paths
libdir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
# Require Thor since that's what the whole CLI is built around
require 'thor'
# CLI Module
2015-01-04 15:23:35 -05: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
2015-01-04 15:23:35 -05:00
def self.exit_on_failure?
true
2011-12-21 15:13:28 -05:00
end
end
end
# Require the Middleman version
require 'middleman-core/version'
2011-12-29 01:52:51 -05:00
# Include the core CLI items
2014-01-02 19:34:08 -05:00
require 'middleman-cli/init'
require 'middleman-cli/extension'
require 'middleman-cli/server'
require 'middleman-cli/build'
require 'middleman-cli/console'