summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-04-13 21:25:53 -0500
committerkpdecker <kpdecker@gmail.com>2015-04-13 21:25:53 -0500
commita7160a8d2745de95cb9da7d20ff02795b0d3f784 (patch)
treec6302760dd6540430f8660e85871932c03fae52c
parentdfd141cd3566c52c271c7470ff690fa6ace6f548 (diff)
downloadhandlebars.js-a7160a8d2745de95cb9da7d20ff02795b0d3f784.zip
handlebars.js-a7160a8d2745de95cb9da7d20ff02795b0d3f784.tar.gz
handlebars.js-a7160a8d2745de95cb9da7d20ff02795b0d3f784.tar.bz2
Expose Visitor in full browser build
Fixes #994
-rw-r--r--lib/handlebars.js3
-rw-r--r--lib/index.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/handlebars.js b/lib/handlebars.js
index 81b7cfb..6398a05 100644
--- a/lib/handlebars.js
+++ b/lib/handlebars.js
@@ -6,6 +6,7 @@ import AST from "./handlebars/compiler/ast";
import { parser as Parser, parse } from "./handlebars/compiler/base";
import { Compiler, compile, precompile } from "./handlebars/compiler/compiler";
import JavaScriptCompiler from "./handlebars/compiler/javascript-compiler";
+import Visitor from "./handlebars/compiler/visitor";
var _create = Handlebars.create;
var create = function() {
@@ -30,6 +31,8 @@ var create = function() {
Handlebars = create();
Handlebars.create = create;
+Handlebars.Visitor = Visitor;
+
/*jshint -W040 */
/* istanbul ignore next */
var root = typeof global !== 'undefined' ? global : window,
diff --git a/lib/index.js b/lib/index.js
index 790aab7..8213d14 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -5,8 +5,6 @@
var handlebars = require('../dist/cjs/handlebars')["default"];
-handlebars.Visitor = require('../dist/cjs/handlebars/compiler/visitor')["default"];
-
var printer = require('../dist/cjs/handlebars/compiler/printer');
handlebars.PrintVisitor = printer.PrintVisitor;
handlebars.print = printer.print;