bin/middleman in middleman-cli-4.3.0.rc.4 vs bin/middleman in middleman-cli-4.3.0
- old
+ new
@@ -4,11 +4,11 @@
if ARGV.include? '--profile'
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new
end
# Middleman::Profiling.start
-require 'middleman-core/load_paths'
+require "middleman-core/load_paths"
Middleman.setup_load_paths
require 'dotenv'
::Dotenv.load
@@ -33,21 +33,22 @@
end
end
end
end
-require 'middleman-cli'
+require "middleman-cli"
# Change directory to the root
-Dir.chdir(ENV['MM_ROOT']) if ENV['MM_ROOT']
+Dir.chdir(ENV["MM_ROOT"]) if ENV["MM_ROOT"]
# Default command is server
-if ARGV[0] != 'help' && (ARGV.empty? || ARGV.first.include?('-'))
+if ARGV[0] != 'help' && (ARGV.length < 1 || ARGV.first.include?('-'))
ARGV.unshift('server')
end
::Middleman::Logger.singleton(3)
::Middleman::Cli.config = ::Middleman::Application.new do
+ #
config[:environment] = (ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development').to_sym
config[:mode] = :config
config[:exit_before_ready] = true
config[:watcher_disable] = true
config[:disable_sitemap] = true