From 8c49721c704013656e96a53903d3302e52b0e5e3 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Sat, 30 Jul 2011 10:28:31 -0500 Subject: [PATCH] Move visitor into compiler subdir --- Rakefile | 4 ++-- lib/handlebars.js | 2 +- lib/handlebars/compiler/printer.js | 2 +- lib/handlebars/{ => compiler}/visitor.js | 0 spec/spec_helper.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename lib/handlebars/{ => compiler}/visitor.js (100%) diff --git a/Rakefile b/Rakefile index 405e7cba..31a5e950 100644 --- a/Rakefile +++ b/Rakefile @@ -28,11 +28,11 @@ def remove_exports(string) match ? match[1] : string end -minimal_deps = %w(compiler/parser base compiler/ast visitor utils compiler/compiler vm).map do |file| +minimal_deps = %w(compiler/parser base compiler/ast utils compiler/compiler vm).map do |file| "lib/handlebars/#{file}.js" end -debug_deps = %w(compiler/parser base compiler/ast visitor compiler/printer utils compiler/compiler vm debug).map do |file| +debug_deps = %w(compiler/parser base compiler/ast compiler/visitor compiler/printer utils compiler/compiler vm debug).map do |file| "lib/handlebars/#{file}.js" end diff --git a/lib/handlebars.js b/lib/handlebars.js index 79d600cc..aab2d550 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -5,7 +5,7 @@ require("handlebars/utils"); require("handlebars/compiler/ast"); require("handlebars/compiler/printer"); -require("handlebars/visitor"); +require("handlebars/compiler/visitor"); require("handlebars/compiler/compiler"); require("handlebars/vm"); diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js index 7be3f981..1866830b 100644 --- a/lib/handlebars/compiler/printer.js +++ b/lib/handlebars/compiler/printer.js @@ -1,5 +1,5 @@ var Handlebars = require("handlebars"); -require("handlebars/visitor"); +require("./visitor"); // BEGIN(BROWSER) Handlebars.PrintVisitor = function() { this.padding = 0; }; diff --git a/lib/handlebars/visitor.js b/lib/handlebars/compiler/visitor.js similarity index 100% rename from lib/handlebars/visitor.js rename to lib/handlebars/compiler/visitor.js diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 59c32aa2..41f06ae1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -75,7 +75,7 @@ module Handlebars Handlebars::Spec.js_load('lib/handlebars/compiler/parser.js') Handlebars::Spec.js_load('lib/handlebars/base.js'); Handlebars::Spec.js_load('lib/handlebars/compiler/ast.js'); - Handlebars::Spec.js_load('lib/handlebars/visitor.js'); + Handlebars::Spec.js_load('lib/handlebars/compiler/visitor.js'); Handlebars::Spec.js_load('lib/handlebars/compiler/printer.js') Handlebars::Spec.js_load('lib/handlebars/utils.js') Handlebars::Spec.js_load('lib/handlebars/compiler/compiler.js')