blog compat

This commit is contained in:
Thomas Reynolds 2014-12-24 11:38:54 -08:00
parent ee4c68b03c
commit ef0b996004
5 changed files with 12 additions and 6 deletions

View file

@ -11,7 +11,7 @@ module Middleman::Cli
desc 'build [options]', 'Builds the static site for deployment'
method_option :environment,
aliases: '-e',
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development',
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'production',
desc: 'The environment Middleman will run under'
method_option :clean,
type: :boolean,

View file

@ -0,0 +1,2 @@
# Backwards compat
require 'middleman-cli'

View file

@ -80,7 +80,7 @@ module Middleman
# Name of the source directory
# @return [String]
config.define_setting :source, 'source', 'Name of the source directory'
config.define_setting :source, 'source', 'Name of the source directory'
# Middleman mode. Defaults to :server, set to :build by the build process
# @return [String]
@ -255,12 +255,12 @@ module Middleman
Tilt.mappings.delete(key)
end
end
@extensions.activate_all
run_hook :after_configuration
config_context.execute_after_configuration_callbacks
@extensions.activate_all
run_hook :ready
@config_context.execute_ready_callbacks
end

View file

@ -39,7 +39,11 @@ module Middleman
def evaluate(scope, _)
@output ||= begin
MiddlemanRedcarpetHTML.scope = ::Middleman::Renderers::Haml.last_haml_scope || scope
if defined?(::Middleman::Renderers::Haml)
MiddlemanRedcarpetHTML.scope = ::Middleman::Renderers::Haml.last_haml_scope || scope
else
MiddlemanRedcarpetHTML.scope = scope
end
@engine.render(data)
end

View file

@ -1,5 +1,5 @@
module Middleman
# Current Version
# @return [String]
VERSION = '4.0.0.alpha.3' unless const_defined?(:VERSION)
VERSION = '4.0.0.alpha.4' unless const_defined?(:VERSION)
end