Commit Graph

10 Commits

Author SHA1 Message Date
tomhuda 88e7003331 * Added a few public API methods to JavaScriptCompiler.prototype, so it can be subclassed.
* made it possible to define an alternate name lookup scheme (so that {{foo}} does not have to be
    context.foo, but can instead be something like context.get('foo'))
  * made it possible to substitute an alternate buffer instead of the default empty String and override how
    the compiled template appends to the buffer
* Added the concept of template-local data. In order to enable template-local data, pass true
  as the second parameter to the template compiler. Then, pass in the data as the fourth
  parameter (context, helpers, partials, data). These signatures may change before the 1.0 release.
2011-02-11 17:03:12 -08:00
wycats aaaafb4400 Makes Handlebars work in contexts without a global object (node) 2011-02-08 14:31:09 -08:00
wycats b7c649617b noop should return an empty String, not undefined 2011-01-11 23:16:03 -08:00
wycats 1974aa5277 If the partial is not found, an exception should be thrown 2010-12-29 19:23:23 -08:00
wycats e20c57c9b2 Move compile to the right spot 2010-12-29 19:09:55 -08:00
wycats bf6c74aa83 Restructure things more simply 2010-12-29 18:21:43 -08:00
wycats 16ed2cd3f1 Refactoring and performance enhancements on the VM compiler 2010-12-21 09:47:27 -08:00
wycats fc0d721b96 Use pluggable logger rather the puts 2010-12-21 09:45:59 -08:00
wycats f4ae0c27fe Allow reserved words to be used without slowing down most operations in browsers with faster foo.bar vs. foo['bar']. 2010-12-19 00:06:30 -08:00
wycats b418ef6eb2 Add optimized compiled version of handlebars, which should be significantly faster. Use Handlebars.VM.compile instead of Handlebars.compile to use the optimized version.
Major TODOS:

* clean up a bunch of code duplication in the compiler
* reorganize the compiler
* add support for debug symbols which would make it possible
  to provide information about what part of the source caused
  a runtime error.
2010-12-18 23:27:34 -08:00