init builder after features are enabled
This commit is contained in:
parent
4c7c3453e9
commit
d979c56b69
|
@ -4,7 +4,9 @@ ENV['MM_ENV'] = "build"
|
||||||
|
|
||||||
# Require app
|
# Require app
|
||||||
require File.join(File.dirname(__FILE__), "..", "lib", "middleman")
|
require File.join(File.dirname(__FILE__), "..", "lib", "middleman")
|
||||||
Middleman::Base.init!
|
|
||||||
|
|
||||||
require 'middleman/builder'
|
require 'middleman/builder'
|
||||||
|
|
||||||
|
Middleman::Base.init!
|
||||||
|
Middleman::Builder.init!
|
||||||
|
|
||||||
Middleman::Generators.run_cli(Dir.pwd, 'mm-build', 1, %w(build --force).concat(ARGV))
|
Middleman::Generators.run_cli(Dir.pwd, 'mm-build', 1, %w(build --force).concat(ARGV))
|
|
@ -36,9 +36,11 @@ module Middleman
|
||||||
super(name, *args, &block)
|
super(name, *args, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.init!
|
||||||
glob! File.basename(Middleman::Base.public), Middleman::Base.supported_formats
|
glob! File.basename(Middleman::Base.public), Middleman::Base.supported_formats
|
||||||
glob! File.basename(Middleman::Base.views), Middleman::Base.supported_formats
|
glob! File.basename(Middleman::Base.views), Middleman::Base.supported_formats
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Generators
|
module Generators
|
||||||
extend ::Templater::Manifold
|
extend ::Templater::Manifold
|
||||||
|
|
|
@ -6,7 +6,6 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
if Middleman::Base.environment == "build"
|
if Middleman::Base.environment == "build"
|
||||||
require "middleman/builder"
|
|
||||||
Middleman::Builder.template :slickmap, "sitemap.html", "sitemap.html"
|
Middleman::Builder.template :slickmap, "sitemap.html", "sitemap.html"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue