finished merge
This commit is contained in:
commit
bccc6d2d74
2
Rakefile
2
Rakefile
|
@ -21,6 +21,8 @@ begin
|
|||
gem.add_dependency("sprockets")
|
||||
gem.add_dependency("sinatra", ">=1.0")
|
||||
gem.add_dependency("sinatra-content-for")
|
||||
gem.add_dependency("less")
|
||||
gem.add_dependency("builder")
|
||||
gem.add_dependency("rack-test")
|
||||
gem.add_dependency("yui-compressor")
|
||||
gem.add_dependency("haml", ">=3.0")
|
||||
|
|
|
@ -11,10 +11,15 @@ module Middleman
|
|||
autoload :MinifyCSS, "middleman/rack/minify_css"
|
||||
end
|
||||
|
||||
module Renderers
|
||||
autoload :ERb, "middleman/renderers/erb"
|
||||
autoload :Builder, "middleman/renderers/builder"
|
||||
autoload :Less, "middleman/renderers/less"
|
||||
end
|
||||
|
||||
autoload :Base, "middleman/base"
|
||||
autoload :ERb, "middleman/erb"
|
||||
autoload :Haml, "middleman/haml"
|
||||
autoload :Sass, "middleman/sass"
|
||||
autoload :Haml, "middleman/renderers/haml"
|
||||
autoload :Sass, "middleman/renderers/sass"
|
||||
autoload :Helpers, "middleman/helpers"
|
||||
|
||||
end
|
|
@ -126,10 +126,11 @@ module Middleman
|
|||
end
|
||||
end
|
||||
|
||||
require "middleman/erb"
|
||||
# Haml is required & includes helpers
|
||||
require "middleman/haml"
|
||||
require "middleman/sass"
|
||||
require "middleman/renderers/erb"
|
||||
require "middleman/renderers/haml"
|
||||
require "middleman/renderers/sass"
|
||||
require "middleman/renderers/less"
|
||||
require "middleman/renderers/builder"
|
||||
|
||||
class Middleman::Base
|
||||
helpers Middleman::Helpers
|
||||
|
|
23
lib/middleman/renderers/builder.rb
Normal file
23
lib/middleman/renderers/builder.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
require "builder"
|
||||
|
||||
module Middleman
|
||||
module Renderers
|
||||
module Builder
|
||||
def self.included(base)
|
||||
base.supported_formats << "builder"
|
||||
end
|
||||
|
||||
def render_path(path, layout)
|
||||
if template_exists?(path, :builder)
|
||||
builder(path.to_sym, :layout => layout)
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Middleman::Base
|
||||
include Middleman::Renderers::Builder
|
||||
end
|
|
@ -1,8 +1,8 @@
|
|||
require "erb"
|
||||
|
||||
module Middleman
|
||||
module Renderers
|
||||
module ERb
|
||||
module Renderer
|
||||
def self.included(base)
|
||||
base.supported_formats << "erb"
|
||||
end
|
||||
|
@ -20,5 +20,5 @@ module Middleman
|
|||
end
|
||||
|
||||
class Middleman::Base
|
||||
include Middleman::ERb::Renderer
|
||||
include Middleman::Renderers::ERb
|
||||
end
|
23
lib/middleman/renderers/less.rb
Normal file
23
lib/middleman/renderers/less.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
require "less"
|
||||
|
||||
module Middleman
|
||||
module Renderers
|
||||
module Less
|
||||
def self.included(base)
|
||||
base.supported_formats << "less"
|
||||
end
|
||||
|
||||
def render_path(path, layout)
|
||||
if template_exists?(path, :less)
|
||||
less(path.to_sym)
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Middleman::Base
|
||||
include Middleman::Renderers::Less
|
||||
end
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{middleman}
|
||||
s.version = "0.14.0"
|
||||
s.version = "0.14.1"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Thomas Reynolds"]
|
||||
s.date = %q{2010-08-03}
|
||||
s.date = %q{2010-09-04}
|
||||
s.email = %q{tdreyno@gmail.com}
|
||||
s.executables = ["mm-init", "mm-build", "mm-server"]
|
||||
s.extra_rdoc_files = [
|
||||
|
@ -43,7 +43,6 @@ Gem::Specification.new do |s|
|
|||
"lib/middleman/base.rb",
|
||||
"lib/middleman/builder.rb",
|
||||
"lib/middleman/config.ru",
|
||||
"lib/middleman/erb.rb",
|
||||
"lib/middleman/fastimage.rb",
|
||||
"lib/middleman/features/asset_host.rb",
|
||||
"lib/middleman/features/automatic_image_sizes.rb",
|
||||
|
@ -53,12 +52,15 @@ Gem::Specification.new do |s|
|
|||
"lib/middleman/features/relative_assets.rb",
|
||||
"lib/middleman/features/slickmap.rb",
|
||||
"lib/middleman/features/smush_pngs.rb",
|
||||
"lib/middleman/haml.rb",
|
||||
"lib/middleman/helpers.rb",
|
||||
"lib/middleman/rack/minify_css.rb",
|
||||
"lib/middleman/rack/minify_javascript.rb",
|
||||
"lib/middleman/rack/sprockets.rb",
|
||||
"lib/middleman/sass.rb",
|
||||
"lib/middleman/renderers/builder.rb",
|
||||
"lib/middleman/renderers/erb.rb",
|
||||
"lib/middleman/renderers/haml.rb",
|
||||
"lib/middleman/renderers/less.rb",
|
||||
"lib/middleman/renderers/sass.rb",
|
||||
"lib/middleman/template/init.rbt",
|
||||
"lib/middleman/template/views/index.html.haml",
|
||||
"lib/middleman/template/views/layout.haml",
|
||||
|
@ -120,6 +122,8 @@ Gem::Specification.new do |s|
|
|||
s.add_runtime_dependency(%q<sprockets>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<sinatra>, [">= 1.0"])
|
||||
s.add_runtime_dependency(%q<sinatra-content-for>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<less>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<rack-test>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<yui-compressor>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<haml>, [">= 3.0"])
|
||||
|
@ -139,6 +143,8 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency(%q<sprockets>, [">= 0"])
|
||||
s.add_dependency(%q<sinatra>, [">= 1.0"])
|
||||
s.add_dependency(%q<sinatra-content-for>, [">= 0"])
|
||||
s.add_dependency(%q<less>, [">= 0"])
|
||||
s.add_dependency(%q<builder>, [">= 0"])
|
||||
s.add_dependency(%q<rack-test>, [">= 0"])
|
||||
s.add_dependency(%q<yui-compressor>, [">= 0"])
|
||||
s.add_dependency(%q<haml>, [">= 3.0"])
|
||||
|
@ -159,6 +165,8 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency(%q<sprockets>, [">= 0"])
|
||||
s.add_dependency(%q<sinatra>, [">= 1.0"])
|
||||
s.add_dependency(%q<sinatra-content-for>, [">= 0"])
|
||||
s.add_dependency(%q<less>, [">= 0"])
|
||||
s.add_dependency(%q<builder>, [">= 0"])
|
||||
s.add_dependency(%q<rack-test>, [">= 0"])
|
||||
s.add_dependency(%q<yui-compressor>, [">= 0"])
|
||||
s.add_dependency(%q<haml>, [">= 3.0"])
|
||||
|
|
Loading…
Reference in a new issue