diff options
author | Yehuda Katz <wycats@gmail.com> | 2013-07-24 05:03:27 +0000 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2013-07-24 05:03:27 +0000 |
commit | f5c8484ea0c1ac1aec6994ad3b5928fb67b7aa62 (patch) | |
tree | 8e92df6cccab8ff4da78c11d90d4e534a19374b8 /lib/handlebars/compiler/compiler.js | |
parent | da130f7745fc338d7ea31c60d9954ab6e0e1511a (diff) | |
download | handlebars.js-f5c8484ea0c1ac1aec6994ad3b5928fb67b7aa62.zip handlebars.js-f5c8484ea0c1ac1aec6994ad3b5928fb67b7aa62.tar.gz handlebars.js-f5c8484ea0c1ac1aec6994ad3b5928fb67b7aa62.tar.bz2 |
Further progress towards modularization.
At this point, I have only 2 fails in the Node build, but I'm doing a
bunch of manual stuff locally and still have a bunch of hacks.
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); } |