middleman 0.99.1.pre → 0.99.2.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/Rakefile +9 -17
  2. data/VERSION +1 -1
  3. data/features/builder.feature +16 -0
  4. data/features/coffee-script.feature +7 -0
  5. data/features/helpers_auto_stylesheet_link_tag.feature +17 -0
  6. data/features/helpers_page_classes.feature +17 -0
  7. data/features/less-css.feature +7 -0
  8. data/features/padrino_helpers.feature +10 -0
  9. data/features/scss-support.feature +7 -0
  10. data/features/step_definitions/asset_host_steps.rb +1 -1
  11. data/features/step_definitions/builder_steps.rb +45 -0
  12. data/features/step_definitions/env.rb +1 -1
  13. data/features/step_definitions/generator_steps.rb +9 -3
  14. data/features/step_definitions/middleman_steps.rb +8 -6
  15. data/features/step_definitions/page_layout_steps.rb +2 -2
  16. data/features/{asset_host.feature → w_asset_host.feature} +0 -0
  17. data/features/{automatic_image_sizes.feature → x_automatic_image_sizes.feature} +0 -0
  18. data/features/{cache_buster.feature → y_cache_buster.feature} +0 -0
  19. data/features/{relative_assets.feature → z_relative_assets.feature} +0 -0
  20. data/{spec/fixtures/sample → fixtures/test-app}/config.rb +0 -0
  21. data/{spec/fixtures/sample → fixtures/test-app}/public/images/blank.gif +0 -0
  22. data/{spec/fixtures/sample → fixtures/test-app}/public/static.html +0 -0
  23. data/{spec/fixtures/sample → fixtures/test-app}/public/stylesheets/auto-css.css +0 -0
  24. data/{spec/fixtures/sample → fixtures/test-app}/public/stylesheets/static.css +0 -0
  25. data/{spec/fixtures/sample → fixtures/test-app}/public/stylesheets/sub1/auto-css.css +0 -0
  26. data/{spec/fixtures/sample → fixtures/test-app}/public/stylesheets/sub1/sub2/auto-css.css +0 -0
  27. data/{spec/fixtures/sample → fixtures/test-app}/views/_partial.haml +0 -0
  28. data/{spec/fixtures/sample → fixtures/test-app}/views/asset_host.html.haml +0 -0
  29. data/{spec/fixtures/sample → fixtures/test-app}/views/auto-css.html.haml +0 -0
  30. data/{spec/fixtures/sample → fixtures/test-app}/views/auto-image-sizes.html.haml +0 -0
  31. data/{spec/fixtures/sample → fixtures/test-app}/views/cache-buster.html.haml +0 -0
  32. data/{spec/fixtures/sample → fixtures/test-app}/views/custom-layout.html.haml +0 -0
  33. data/{spec/fixtures/sample → fixtures/test-app}/views/index.html.haml +0 -0
  34. data/{spec/fixtures/sample → fixtures/test-app}/views/inline-css.html.haml +0 -0
  35. data/{spec/fixtures/sample → fixtures/test-app}/views/inline-js.html.haml +0 -0
  36. data/fixtures/test-app/views/javascripts/coffee_test.js.coffee +3 -0
  37. data/{spec/fixtures/sample → fixtures/test-app}/views/layout.haml +0 -0
  38. data/{spec/fixtures/sample/views → fixtures/test-app/views/layouts}/custom.haml +0 -0
  39. data/fixtures/test-app/views/padrino_test.html.haml +5 -0
  40. data/{spec/fixtures/sample → fixtures/test-app}/views/page-classes.html.haml +0 -0
  41. data/{spec/fixtures/sample → fixtures/test-app}/views/services/index.html.haml +0 -0
  42. data/{spec/fixtures/sample → fixtures/test-app}/views/stylesheets/asset_host.css.sass +0 -0
  43. data/{spec/fixtures/sample → fixtures/test-app}/views/stylesheets/relative_assets.css.sass +0 -0
  44. data/{spec/fixtures/sample → fixtures/test-app}/views/stylesheets/site.css.sass +0 -0
  45. data/{spec/fixtures/sample → fixtures/test-app}/views/stylesheets/site_scss.css.scss +0 -0
  46. data/{spec/fixtures/sample → fixtures/test-app}/views/stylesheets/test_less.css.less +0 -0
  47. data/lib/middleman.rb +9 -1
  48. data/lib/middleman/features.rb +29 -36
  49. data/lib/middleman/features/asset_host.rb +16 -15
  50. data/lib/middleman/features/automatic_image_sizes.rb +26 -24
  51. data/lib/middleman/features/cache_buster.rb +34 -33
  52. data/lib/middleman/features/default_helpers.rb +26 -33
  53. data/lib/middleman/features/livereload.rb +1 -1
  54. data/lib/middleman/features/minify_css.rb +8 -7
  55. data/lib/middleman/features/minify_javascript.rb +11 -10
  56. data/lib/middleman/features/relative_assets.rb +30 -29
  57. data/lib/middleman/features/slickmap.rb +43 -42
  58. data/lib/middleman/features/smush_pngs.rb +29 -29
  59. data/lib/middleman/features/ugly_haml.rb +7 -6
  60. data/lib/middleman/renderers/{coffee.rb → coffee_script.rb} +11 -8
  61. data/lib/middleman/renderers/haml.rb +28 -33
  62. data/lib/middleman/renderers/sass.rb +30 -28
  63. data/lib/middleman/server.rb +44 -49
  64. data/lib/middleman/template/config.rbt +6 -6
  65. data/middleman.gemspec +49 -50
  66. metadata +79 -75
  67. data/lib/middleman/renderers.rb +0 -26
  68. data/spec/builder_spec.rb +0 -62
  69. data/spec/fixtures/sample/views/maruku.html.maruku +0 -1
  70. data/spec/helpers_spec.rb +0 -43
  71. data/spec/spec_helper.rb +0 -8
@@ -1,21 +1,22 @@
1
- class Middleman::Features::AssetHost
2
- def initialize(app, config)
3
- Middleman::Server.after_feature_init do
4
- if Middleman::Server.asset_host.is_a?(Proc)
5
- ::Compass.configuration.asset_host(&Middleman::Server.asset_host)
1
+ module Middleman::Features::AssetHost
2
+ class << self
3
+ def registered(app)
4
+ app.after_feature_init do
5
+ if Middleman::Server.asset_host.is_a?(Proc)
6
+ ::Compass.configuration.asset_host(&Middleman::Server.asset_host)
7
+ end
6
8
  end
7
- end
8
-
9
- Middleman::Assets.register :asset_host do |path, prefix, request|
10
- original_output = Middleman::Assets.before(:asset_host, path, prefix, request)
11
9
 
12
- valid_extensions = %w(.png .gif .jpg .jpeg .js .css)
10
+ Middleman::Assets.register :asset_host do |path, prefix, request|
11
+ original_output = Middleman::Assets.before(:asset_host, path, prefix, request)
12
+
13
+ valid_extensions = %w(.png .gif .jpg .jpeg .js .css)
13
14
 
14
- asset_prefix = Middleman::Server.asset_host.call(original_output)
15
+ asset_prefix = Middleman::Server.asset_host.call(original_output)
15
16
 
16
- File.join(asset_prefix, original_output)
17
+ File.join(asset_prefix, original_output)
18
+ end
17
19
  end
20
+ alias :included :registered
18
21
  end
19
- end
20
-
21
- Middleman::Features.register :asset_host, Middleman::Features::AssetHost
22
+ end
@@ -1,31 +1,33 @@
1
- class Middleman::Features::AutomaticImageSizes
2
- def initialize(app, config)
3
- require "middleman/features/automatic_image_sizes/fastimage"
1
+ module Middleman::Features::AutomaticImageSizes
2
+ class << self
3
+ def registered(app)
4
+ require "middleman/features/automatic_image_sizes/fastimage"
4
5
 
5
- Middleman::Server.helpers do
6
- alias_method :pre_automatic_image_tag, :image_tag
7
- def image_tag(path, params={})
8
- if (!params[:width] || !params[:height]) && !path.include?("://")
9
- params[:alt] ||= ""
10
- http_prefix = settings.http_images_path rescue settings.images_dir
6
+ app.helpers Helpers
7
+ end
8
+ alias :included :registered
9
+ end
10
+
11
+ module Helpers
12
+ def image_tag(path, params={})
13
+ if (!params[:width] || !params[:height]) && !path.include?("://")
14
+ params[:alt] ||= ""
15
+ http_prefix = settings.http_images_path rescue settings.images_dir
11
16
 
12
- begin
13
- real_path = File.join(settings.public, settings.images_dir, path)
14
- if File.exists? real_path
15
- dimensions = ::FastImage.size(real_path, :raise_on_failure => true)
16
- params[:width] ||= dimensions[0]
17
- params[:height] ||= dimensions[1]
18
- end
19
- rescue
17
+ begin
18
+ real_path = File.join(settings.public, settings.images_dir, path)
19
+ if File.exists? real_path
20
+ dimensions = ::FastImage.size(real_path, :raise_on_failure => true)
21
+ params[:width] ||= dimensions[0]
22
+ params[:height] ||= dimensions[1]
20
23
  end
21
-
22
- capture_haml { haml_tag(:img, params.merge(:src => asset_url(path, http_prefix))) }
23
- else
24
- pre_automatic_image_tag(path, params)
24
+ rescue
25
25
  end
26
+
27
+ super(asset_url(path, http_prefix), params)
28
+ else
29
+ super(path, params)
26
30
  end
27
31
  end
28
32
  end
29
- end
30
-
31
- Middleman::Features.register :automatic_image_sizes, Middleman::Features::AutomaticImageSizes
33
+ end
@@ -1,43 +1,44 @@
1
- class Middleman::Features::CacheBuster
2
- def initialize(app, config)
3
- Middleman::Assets.register :cache_buster do |path, prefix, request|
4
- http_path = Middleman::Assets.before(:cache_buster, path, prefix, request)
1
+ module Middleman::Features::CacheBuster
2
+ class << self
3
+ def registered(app)
4
+ Middleman::Assets.register :cache_buster do |path, prefix, request|
5
+ http_path = Middleman::Assets.before(:cache_buster, path, prefix, request)
5
6
 
6
- if http_path.include?("://") || !%w(.css .png .jpg .js .gif).include?(File.extname(http_path))
7
- http_path
8
- else
9
- begin
10
- prefix = Middleman::Server.images_dir if prefix == Middleman::Server.http_images_path
11
- rescue
12
- end
7
+ if http_path.include?("://") || !%w(.css .png .jpg .js .gif).include?(File.extname(http_path))
8
+ http_path
9
+ else
10
+ begin
11
+ prefix = Middleman::Server.images_dir if prefix == Middleman::Server.http_images_path
12
+ rescue
13
+ end
13
14
 
14
- real_path_static = File.join(Middleman::Server.public, prefix, path)
15
+ real_path_static = File.join(Middleman::Server.public, prefix, path)
15
16
 
16
- if File.readable?(real_path_static)
17
- http_path << "?" + File.mtime(real_path_static).strftime("%s")
18
- elsif Middleman::Server.environment == :build
19
- real_path_dynamic = File.join(Middleman::Server.root, Middleman::Server.build_dir, prefix, path)
20
- http_path << "?" + File.mtime(real_path_dynamic).strftime("%s") if File.readable?(real_path_dynamic)
21
- end
17
+ if File.readable?(real_path_static)
18
+ http_path << "?" + File.mtime(real_path_static).strftime("%s")
19
+ elsif Middleman::Server.environment == :build
20
+ real_path_dynamic = File.join(Middleman::Server.root, Middleman::Server.build_dir, prefix, path)
21
+ http_path << "?" + File.mtime(real_path_dynamic).strftime("%s") if File.readable?(real_path_dynamic)
22
+ end
22
23
 
23
- http_path
24
+ http_path
25
+ end
24
26
  end
25
- end
26
-
27
- Middleman::Server.after_feature_init do
28
- ::Compass.configuration do |config|
29
- config.asset_cache_buster do |path, real_path|
30
- real_path = real_path.path if real_path.is_a? File
31
- real_path = real_path.gsub(File.join(Middleman::Server.root, Middleman::Server.build_dir), Middleman::Server.public)
32
- if File.readable?(real_path)
33
- File.mtime(real_path).strftime("%s")
34
- else
35
- $stderr.puts "WARNING: '#{File.basename(path)}' was not found (or cannot be read) in #{File.dirname(real_path)}"
27
+
28
+ app.after_feature_init do
29
+ ::Compass.configuration do |config|
30
+ config.asset_cache_buster do |path, real_path|
31
+ real_path = real_path.path if real_path.is_a? File
32
+ real_path = real_path.gsub(File.join(Middleman::Server.root, Middleman::Server.build_dir), Middleman::Server.public)
33
+ if File.readable?(real_path)
34
+ File.mtime(real_path).strftime("%s")
35
+ else
36
+ $stderr.puts "WARNING: '#{File.basename(path)}' was not found (or cannot be read) in #{File.dirname(real_path)}"
37
+ end
36
38
  end
37
39
  end
38
40
  end
39
41
  end
42
+ alias :included :registered
40
43
  end
41
- end
42
-
43
- Middleman::Features.register :cache_buster, Middleman::Features::CacheBuster
44
+ end
@@ -1,6 +1,9 @@
1
- class Middleman::Features::DefaultHelpers
2
- def initialize(app, config)
3
- Middleman::Server.helpers Helpers
1
+ module Middleman::Features::DefaultHelpers
2
+ class << self
3
+ def registered(app)
4
+ app.helpers Middleman::Features::DefaultHelpers::Helpers
5
+ end
6
+ alias :included :registered
4
7
  end
5
8
 
6
9
  module Helpers
@@ -14,8 +17,9 @@ class Middleman::Features::DefaultHelpers
14
17
  css_file = File.join(self.class.public, self.class.css_dir, "#{path}.css")
15
18
  sass_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.sass")
16
19
  scss_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.scss")
20
+ less_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.less")
17
21
 
18
- if File.exists?(css_file) || File.exists?(sass_file) || File.exists?(scss_file)
22
+ if File.exists?(css_file) || File.exists?(sass_file) || File.exists?(scss_file) || File.exists?(less_file)
19
23
  stylesheet_link_tag "#{path}.css"
20
24
  end
21
25
  end
@@ -36,33 +40,22 @@ class Middleman::Features::DefaultHelpers
36
40
  Middleman::Assets.get_url(path, prefix, request)
37
41
  end
38
42
 
39
- def link_to(title, url="#", params={})
40
- params.merge!(:href => url)
41
- params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
42
- %Q{<a #{params}>#{title}</a>}
43
- end
44
-
45
- def image_tag(path, params={})
46
- params[:alt] ||= ""
47
- prefix = settings.http_images_path rescue settings.images_dir
48
- params = params.merge(:src => asset_url(path, prefix))
49
- params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
50
- "<img #{params} />"
51
- end
52
-
53
- def javascript_include_tag(path, params={})
54
- params = params.merge(:src => asset_url(path, settings.js_dir), :type => "text/javascript")
55
- params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
56
- "<script #{params}></script>"
57
- end
58
-
59
- def stylesheet_link_tag(path, params={})
60
- params[:rel] ||= "stylesheet"
61
- params = params.merge(:href => asset_url(path, settings.css_dir), :type => "text/css")
62
- params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ')
63
- "<link #{params} />"
64
- end
43
+ # Padrino's asset handling needs to pass through ours
44
+ def asset_path(kind, source)
45
+ return source if source =~ /^http/
46
+ asset_folder = case kind
47
+ when :css then settings.css_dir
48
+ when :js then settings.js_dir
49
+ when :images then settings.images_dir
50
+ else kind.to_s
51
+ end
52
+ source = source.to_s.gsub(/\s/, '')
53
+ ignore_extension = (asset_folder.to_s == kind.to_s) # don't append extension
54
+ source << ".#{kind}" unless ignore_extension or source =~ /\.#{kind}/
55
+ result_path = source if source =~ %r{^/} # absolute path
56
+ result_path ||= asset_url(source, asset_folder)
57
+ timestamp = asset_timestamp(result_path)
58
+ "#{result_path}#{timestamp}"
59
+ end
65
60
  end
66
- end
67
-
68
- Middleman::Features.register :default_helpers, Middleman::Features::DefaultHelpers, { :auto_enable => true }
61
+ end
@@ -1,4 +1,4 @@
1
- class Middleman::Features::LiveReload
1
+ module Middleman::Features::LiveReload
2
2
  def initialize(app, config)
3
3
  return unless Middleman::Server.environment == :development
4
4
 
@@ -1,9 +1,10 @@
1
- class Middleman::Features::MinifyCSS
2
- def initialize(app, config)
3
- Middleman::Server.after_feature_init do
4
- ::Compass.configuration.output_style = :compressed
1
+ module Middleman::Features::MinifyCss
2
+ class << self
3
+ def registered(app)
4
+ app.after_feature_init do
5
+ ::Compass.configuration.output_style = :compressed
6
+ end
5
7
  end
8
+ alias :included :registered
6
9
  end
7
- end
8
-
9
- Middleman::Features.register :minify_css, Middleman::Features::MinifyCSS
10
+ end
@@ -1,11 +1,14 @@
1
- class Middleman::Features::MinifyJavascript
2
- def initialize(app, config)
3
- Haml::Javascript.send :include, ::Haml::Filters::Base
4
-
5
- require "middleman/features/minify_javascript/rack"
6
- app.use Middleman::Rack::MinifyJavascript
1
+ module Middleman::Features::MinifyJavascript
2
+ class << self
3
+ def registered(app)
4
+ Middleman::Features::MinifyJavascript::Haml::Javascript.send :include, ::Haml::Filters::Base
5
+
6
+ require "middleman/features/minify_javascript/rack"
7
+ app.use Middleman::Rack::MinifyJavascript
8
+ end
9
+ alias :included :registered
7
10
  end
8
-
11
+
9
12
  module Haml
10
13
  module Javascript
11
14
  def render_with_options(text, options)
@@ -15,6 +18,4 @@ class Middleman::Features::MinifyJavascript
15
18
  end
16
19
  end
17
20
  end
18
- end
19
-
20
- Middleman::Features.register :minify_javascript, Middleman::Features::MinifyJavascript
21
+ end
@@ -1,35 +1,36 @@
1
- class Middleman::Features::RelativeAssets
2
- def initialize(app, config)
3
- ::Compass.configuration.relative_assets = true
4
-
5
- Middleman::Assets.register :relative_assets do |path, prefix, request|
6
- begin
7
- prefix = Middleman::Server.images_dir if prefix == Middleman::Server.http_images_path
8
- rescue
9
- end
10
-
11
- if path.include?("://")
12
- Middleman::Assets.before(:relative_assets, path, prefix, request)
13
- elsif path[0,1] == "/"
14
- path
15
- else
16
- path = File.join(prefix, path) if prefix.length > 0
17
- request_path = request.path_info.dup
18
- request_path << Middleman::Server.index_file if path.match(%r{/$})
19
- request_path.gsub!(%r{^/}, '')
20
- parts = request_path.split('/')
1
+ module Middleman::Features::RelativeAssets
2
+ class << self
3
+ def registered(app)
4
+ ::Compass.configuration.relative_assets = true
21
5
 
22
- if parts.length > 1
23
- arry = []
24
- (parts.length - 1).times { arry << ".." }
25
- arry << path
26
- File.join(*arry)
27
- else
6
+ Middleman::Assets.register :relative_assets do |path, prefix, request|
7
+ begin
8
+ prefix = Middleman::Server.images_dir if prefix == Middleman::Server.http_images_path
9
+ rescue
10
+ end
11
+
12
+ if path.include?("://")
13
+ Middleman::Assets.before(:relative_assets, path, prefix, request)
14
+ elsif path[0,1] == "/"
28
15
  path
16
+ else
17
+ path = File.join(prefix, path) if prefix.length > 0
18
+ request_path = request.path_info.dup
19
+ request_path << Middleman::Server.index_file if path.match(%r{/$})
20
+ request_path.gsub!(%r{^/}, '')
21
+ parts = request_path.split('/')
22
+
23
+ if parts.length > 1
24
+ arry = []
25
+ (parts.length - 1).times { arry << ".." }
26
+ arry << path
27
+ File.join(*arry)
28
+ else
29
+ path
30
+ end
29
31
  end
30
32
  end
31
33
  end
34
+ alias :included :registered
32
35
  end
33
- end
34
-
35
- Middleman::Features.register :relative_assets, Middleman::Features::RelativeAssets
36
+ end
@@ -1,57 +1,60 @@
1
1
  Entry = Struct.new(:dir, :children)
2
2
 
3
- class Middleman::Features::Slickmap
4
- def initialize(app, config)
5
- require 'slickmap'
3
+ module Middleman::Features::Slickmap
4
+ class << self
5
+ def registered(app)
6
+ require 'slickmap'
6
7
 
7
- @sitemap_url = config[:url] || "sitemap.html"
8
+ @sitemap_url = config[:url] || "sitemap.html"
8
9
 
9
- if Middleman::Server.environment == :build
10
- Middleman::Builder.template :slickmap, @sitemap_url, @sitemap_url
11
- end
12
-
13
- Middleman::Server.helpers do
14
- def sitemap_node(n, first=false)
15
- if n.children.length < 1
16
- if !first && File.extname(n.dir).length > 0
17
- haml_tag :li do
18
- path = n.dir.gsub(self.class.views, '')
19
- haml_concat link_to(File.basename(path), path)
20
- end
21
- end
22
- else
23
- haml_tag(:li, :id => first ? "home" : nil) do
24
- if first
25
- haml_concat link_to("Homepage", "/" + self.class.index_file)
26
- else
27
- # we are a dir
28
- index = n.children.find { |c| c.dir.include?(self.class.index_file) }
29
- haml_concat link_to(index.dir.gsub(self.class.views + "/", '').gsub("/" + File.basename(index.dir), '').capitalize, index.dir.gsub(self.class.views, ''))
30
- end
10
+ if Middleman::Server.environment == :build
11
+ Middleman::Builder.template :slickmap, @sitemap_url, @sitemap_url
12
+ end
31
13
 
32
- other_children = n.children.select { |c| !c.dir.include?(self.class.index_file) }
33
- if other_children.length > 0
14
+ Middleman::Server.helpers do
15
+ def sitemap_node(n, first=false)
16
+ if n.children.length < 1
17
+ if !first && File.extname(n.dir).length > 0
18
+ haml_tag :li do
19
+ path = n.dir.gsub(self.class.views, '')
20
+ haml_concat link_to(File.basename(path), path)
21
+ end
22
+ end
23
+ else
24
+ haml_tag(:li, :id => first ? "home" : nil) do
34
25
  if first
35
- other_children.each { |i| sitemap_node(i) }
26
+ haml_concat link_to("Homepage", "/" + self.class.index_file)
36
27
  else
37
- haml_tag :ul do
28
+ # we are a dir
29
+ index = n.children.find { |c| c.dir.include?(self.class.index_file) }
30
+ haml_concat link_to(index.dir.gsub(self.class.views + "/", '').gsub("/" + File.basename(index.dir), '').capitalize, index.dir.gsub(self.class.views, ''))
31
+ end
32
+
33
+ other_children = n.children.select { |c| !c.dir.include?(self.class.index_file) }
34
+ if other_children.length > 0
35
+ if first
38
36
  other_children.each { |i| sitemap_node(i) }
37
+ else
38
+ haml_tag :ul do
39
+ other_children.each { |i| sitemap_node(i) }
40
+ end
39
41
  end
40
42
  end
41
- end
42
- end
43
+ end
44
+ end
43
45
  end
44
46
  end
45
- end
46
47
 
47
- Middleman::Server.get "/#{@sitemap_url}" do
48
- # Return :utility to put it util top menu. False to ignore
49
- @tree, @utility = Middleman::Features::Slickmap.build_sitemap do |file_name|
50
- :valid
48
+ Middleman::Server.get "/#{@sitemap_url}" do
49
+ # Return :utility to put it util top menu. False to ignore
50
+ @tree, @utility = Middleman::Features::Slickmap.build_sitemap do |file_name|
51
+ :valid
52
+ end
53
+
54
+ haml "template.html".to_sym, :layout => false, :views => File.expand_path(File.join(File.dirname(__FILE__), "slickmap"))
51
55
  end
52
-
53
- haml "template.html".to_sym, :layout => false, :views => File.expand_path(File.join(File.dirname(__FILE__), "slickmap"))
54
56
  end
57
+ alias :included :registered
55
58
  end
56
59
 
57
60
  def self.build_sitemap(&block)
@@ -83,6 +86,4 @@ class Middleman::Features::Slickmap
83
86
 
84
87
  entry
85
88
  end
86
- end
87
-
88
- Middleman::Features.register :slickmap, Middleman::Features::Slickmap
89
+ end