diff --git a/CHANGELOG b/CHANGELOG index fb9c0434..54ded876 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne Sitemap object representing the known world FileWatcher proxies file change events Unified callback solution +Removed Slim and Maruku from base install. Will need to be installed and required by the user (in config.rb) 2.0.14 ==== diff --git a/fixtures/test-app/config.rb b/fixtures/test-app/config.rb index 04a6d333..0e5a6867 100644 --- a/fixtures/test-app/config.rb +++ b/fixtures/test-app/config.rb @@ -1,3 +1,8 @@ +require "maruku" +require "slim" +require "liquid" +require "coffee-filter" + page "/fake.html", :proxy => "/real.html", :layout => false ignore "/should_be_ignored.html" diff --git a/lib/middleman.rb b/lib/middleman.rb index dfb16c38..11d68f44 100755 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -73,9 +73,7 @@ module Middleman # Custom Renderers module Renderers - autoload :Haml, "middleman/renderers/haml" autoload :Sass, "middleman/renderers/sass" - autoload :Slim, "middleman/renderers/slim" autoload :Markdown, "middleman/renderers/markdown" autoload :ERb, "middleman/renderers/erb" autoload :CoffeeScript, "middleman/renderers/coffee_script" diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index 4eda3c0a..fbb039ce 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -77,10 +77,10 @@ module Middleman::Base # Parse YAML from templates app.register Middleman::CoreExtensions::FrontMatter - + app.set :default_features, [ - :lorem, - :sitemap_tree + # :lorem, + # :sitemap_tree ] # Default layout name diff --git a/lib/middleman/core_extensions/compass.rb b/lib/middleman/core_extensions/compass.rb index ec429ea8..77927de2 100644 --- a/lib/middleman/core_extensions/compass.rb +++ b/lib/middleman/core_extensions/compass.rb @@ -1,3 +1,5 @@ +require "compass" + module Middleman::CoreExtensions::Compass class << self def registered(app) @@ -6,14 +8,6 @@ module Middleman::CoreExtensions::Compass app.define_hook :compass_config app.define_hook :after_compass_config - require "compass" - - # Susy grids - begin - require "susy" - rescue LoadError - end - app.after_configuration do # Support a stand-alone compass config file # Many options are overwritten by Middleman, but the config is a good diff --git a/lib/middleman/core_extensions/rendering.rb b/lib/middleman/core_extensions/rendering.rb index b6ea97d4..f502c7c3 100644 --- a/lib/middleman/core_extensions/rendering.rb +++ b/lib/middleman/core_extensions/rendering.rb @@ -7,8 +7,6 @@ module Middleman::CoreExtensions::Rendering app.register Padrino::Rendering # Activate custom renderers - app.register Middleman::Renderers::Slim - app.register Middleman::Renderers::Haml app.register Middleman::Renderers::Sass app.register Middleman::Renderers::Markdown app.register Middleman::Renderers::ERb diff --git a/lib/middleman/renderers/erb.rb b/lib/middleman/renderers/erb.rb index 236cf789..5efef00c 100644 --- a/lib/middleman/renderers/erb.rb +++ b/lib/middleman/renderers/erb.rb @@ -15,7 +15,7 @@ module Middleman::Renderers::ERb engine = app.settings.erb_engine if engine.is_a? Symbol - engine = app.tilt_template_from_symbol(engine) + engine = app.erb_tilt_template_from_symbol(engine) end ::Tilt.prefer(engine) @@ -25,7 +25,7 @@ module Middleman::Renderers::ERb end module ClassMethods - def tilt_template_from_symbol(engine) + def erb_tilt_template_from_symbol(engine) engine = engine.to_s engine = engine == "erb" ? "ERB" : engine.camelize settings.erb_engine_prefix.const_get("#{engine}Template") diff --git a/lib/middleman/renderers/haml.rb b/lib/middleman/renderers/haml.rb deleted file mode 100755 index 73a45fb3..00000000 --- a/lib/middleman/renderers/haml.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Middleman::Renderers::Haml - class << self - def registered(app) - # Base library - require "haml" - - # Coffee-script filter for Haml - begin - require "coffee-filter" - rescue LoadError - end - - # Code-ray Syntax highlighting - begin - require 'haml-coderay' - rescue LoadError - end - - app.helpers Helpers - - #app.set :haml, app.settings.haml.merge({ :ugly_haml => true }) - end - alias :included :registered - end - - module Helpers - def haml_partial(name, options = {}) - render(name, options) - end - end -end \ No newline at end of file diff --git a/lib/middleman/renderers/liquid.rb b/lib/middleman/renderers/liquid.rb index 929fff53..20c00647 100644 --- a/lib/middleman/renderers/liquid.rb +++ b/lib/middleman/renderers/liquid.rb @@ -16,7 +16,6 @@ module Middleman::Renderers::Liquid if result && result[1] == :liquid request['custom_locals'] ||= {} request['custom_locals'][:data] = data.to_h - # request['custom_locals'].merge(data.to_h) end true diff --git a/lib/middleman/renderers/markdown.rb b/lib/middleman/renderers/markdown.rb index d7d7bf47..ccff0042 100644 --- a/lib/middleman/renderers/markdown.rb +++ b/lib/middleman/renderers/markdown.rb @@ -1,11 +1,9 @@ -require "tilt" - module Middleman::Renderers::Markdown class << self def registered(app) app.extend ClassMethods - app.set :markdown_engine, :maruku + app.set :markdown_engine, nil if !app.respond_to? :markdown_engine_prefix app.set :markdown_engine_prefix, ::Tilt @@ -14,18 +12,20 @@ module Middleman::Renderers::Markdown app.after_configuration do engine = app.settings.markdown_engine - if engine.is_a? Symbol - engine = app.tilt_template_from_symbol(engine) - end + unless engine.nil? + if engine.is_a? Symbol + engine = app.markdown_tilt_template_from_symbol(engine) + end - ::Tilt.prefer(engine) + ::Tilt.prefer(engine) + end end end alias :included :registered end module ClassMethods - def tilt_template_from_symbol(engine) + def markdown_tilt_template_from_symbol(engine) engine = engine.to_s engine = engine == "rdiscount" ? "RDiscount" : engine.camelize settings.markdown_engine_prefix.const_get("#{engine}Template") diff --git a/lib/middleman/renderers/slim.rb b/lib/middleman/renderers/slim.rb deleted file mode 100644 index c67561f7..00000000 --- a/lib/middleman/renderers/slim.rb +++ /dev/null @@ -1,8 +0,0 @@ -module Middleman::Renderers::Slim - class << self - def registered(app) - require "slim" - end - alias :included :registered - end -end \ No newline at end of file diff --git a/middleman.gemspec b/middleman.gemspec index 90f0f5a6..267fbaea 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -24,7 +24,6 @@ Gem::Specification.new do |s| s.add_dependency("thin", ["~> 1.2.11"]) s.add_dependency("thor", ["~> 0.14.0"]) s.add_dependency("tilt", ["~> 1.3.1"]) - s.add_dependency("maruku", ["~> 0.6.0"]) s.add_dependency("sinatra", ["~> 1.3.1"]) s.add_dependency("rack-test", ["~> 0.6.1"]) s.add_dependency("uglifier", ["~> 1.0.0"]) @@ -41,14 +40,13 @@ Gem::Specification.new do |s| s.add_dependency("guard", ["~> 0.8.8"]) s.add_dependency("rb-fsevent") - s.add_dependency("rb-inotify") - # s.add_dependency("eventmachine", ["1.0.0.beta.4"]) - # s.add_dependency("middleman-livereload", ["~> 0.2.0"]) + # s.add_dependency("rb-inotify") # Development and test s.add_development_dependency("coffee-filter", ["~> 0.1.1"]) s.add_development_dependency("liquid", ["~> 2.2.0"]) s.add_development_dependency("slim", ["~> 1.0.2"]) + s.add_development_dependency("maruku", ["~> 0.6.0"]) s.add_development_dependency("cucumber", ["~> 1.0.2"]) s.add_development_dependency("rake", ["~> 0.9.2"]) s.add_development_dependency("rspec", ["~> 2.6.0"])