From f474ca1dfe6d51b689e13f256264ba66a519e1a1 Mon Sep 17 00:00:00 2001 From: Nico Hagenburger Date: Sat, 1 Jan 2011 23:07:37 +0100 Subject: [PATCH] allow to include own file extentions (create list after running config.rb) --- lib/middleman/builder.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/middleman/builder.rb b/lib/middleman/builder.rb index 3e2d4143..78825415 100644 --- a/lib/middleman/builder.rb +++ b/lib/middleman/builder.rb @@ -6,9 +6,6 @@ require 'middleman/templater+dynamic_renderer.rb' module Middleman class Builder < ::Templater::Generator - # Support all Tilt-enabled templates and treat js like a template - @@template_extensions = ::Tilt.mappings.keys << "js" - # Define source and desintation def self.source_root; Dir.pwd; end def destination_root; File.join(Dir.pwd, Middleman::Server.build_dir); end @@ -43,6 +40,8 @@ module Middleman end def self.init! + # Support all Tilt-enabled templates and treat js like a template + @@template_extensions ||= ::Tilt.mappings.keys << "js" glob! File.basename(Middleman::Server.public), @@template_extensions glob! File.basename(Middleman::Server.views), @@template_extensions end