mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
init builder after features are enabled
This commit is contained in:
parent
4c7c3453e9
commit
d979c56b69
3 changed files with 8 additions and 5 deletions
|
@ -4,7 +4,9 @@ ENV['MM_ENV'] = "build"
|
|||
|
||||
# Require app
|
||||
require File.join(File.dirname(__FILE__), "..", "lib", "middleman")
|
||||
Middleman::Base.init!
|
||||
|
||||
require 'middleman/builder'
|
||||
|
||||
Middleman::Base.init!
|
||||
Middleman::Builder.init!
|
||||
|
||||
Middleman::Generators.run_cli(Dir.pwd, 'mm-build', 1, %w(build --force).concat(ARGV))
|
|
@ -36,8 +36,10 @@ module Middleman
|
|||
super(name, *args, &block)
|
||||
end
|
||||
|
||||
glob! File.basename(Middleman::Base.public), Middleman::Base.supported_formats
|
||||
glob! File.basename(Middleman::Base.views), Middleman::Base.supported_formats
|
||||
def self.init!
|
||||
glob! File.basename(Middleman::Base.public), Middleman::Base.supported_formats
|
||||
glob! File.basename(Middleman::Base.views), Middleman::Base.supported_formats
|
||||
end
|
||||
end
|
||||
|
||||
module Generators
|
||||
|
|
|
@ -6,7 +6,6 @@ rescue LoadError
|
|||
end
|
||||
|
||||
if Middleman::Base.environment == "build"
|
||||
require "middleman/builder"
|
||||
Middleman::Builder.template :slickmap, "sitemap.html", "sitemap.html"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue