diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 6e051b7..b779617 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -1,6 +1,8 @@ -import { Exception } from "handlebars/utils"; -import parse from "handlebars/compiler/base"; -import { template } from "handlebars/runtime"; +import { Exception } from "../utils"; +import { template } from "../runtime"; +import { parse } from "./base"; +import { JavaScriptCompiler } from "./javascript-compiler"; +import AST from "./ast"; /*jshint eqnull:true*/ @@ -414,7 +416,7 @@ Compiler.prototype = { }; export function precompile(input, options) { - if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) { + if (input == null || (typeof input !== 'string' && input.constructor !== AST.ProgramNode)) { throw new Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input); } @@ -428,8 +430,8 @@ export function precompile(input, options) { return new JavaScriptCompiler().compile(environment, options); }; -export function compile = function(input, options) { - if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) { +export function compile(input, options) { + if (input == null || (typeof input !== 'string' && input.constructor !== AST.ProgramNode)) { throw new Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input); } |