299a0e81e3
data is passed to block helpers
tomhuda
2011-02-11 20:11:23 -08:00
e719f79259
Update Gemfile to use the released version of the ruby racer
tomhuda
2011-02-11 17:02:41 -08:00
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.
tomhuda
2011-02-11 17:02:26 -08:00
2eb1b30870
Merge branch 'master' of github.com:wycats/handlebars.js
Alan Johnson
2011-02-10 06:27:12 -05:00
40dd2c9750
Updated if helper - missed it in the last cleanup. It no longer supports methods as arguments.
Alan Johnson
2011-02-10 06:27:03 -05:00
4362336656
Fix broken README information
wycats
2011-02-08 15:01:28 -08:00
aaaafb4400
Makes Handlebars work in contexts without a global object (node)
wycats
2011-02-08 14:31:09 -08:00
4d501b6613
Need to require timeout
wycats
2011-02-07 19:41:35 -08:00
0ea89d2c2c
Get specs up to snuff
wycats
2011-01-30 12:21:18 -08:00
ac4d34dbe3
Backed out function helpers.
Alan Johnson
2011-01-25 21:21:57 -05:00
e6b14fa934
Put null byte on content match instead of [^]
Alan Johnson
2011-01-25 21:13:39 -05:00
faea35f8fa
Merging with latest master
Zach Carter
2010-12-20 02:25:25 -05:00
8f502ffbe7
Add #each and #if built-in helpers for more readable iteration and conditionals
wycats
2010-12-19 00:06:55 -08:00
f4ae0c27fe
Allow reserved words to be used without slowing down most operations in browsers with faster foo.bar vs. foo['bar'].
wycats
2010-12-19 00:06:30 -08:00
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.
wycats
2010-12-18 23:27:34 -08:00
e15d675a64
Everything is working now on the new VM except for partials and inverse sections
wycats
2010-12-15 23:42:53 -08:00
42414baa5c
Add new visitor.js file to build dependencies
Zach Carter
2010-12-14 19:18:35 -05:00
820504bbd5
Use 'spec' task instead of 'test'.
Zach Carter
2010-12-14 19:10:41 -05:00
97536f897e
Switch to Jison's lexer.
Zach Carter
2010-12-14 19:07:05 -05:00
ec948c7382
Small restructuring. Have I mentioned how much I hate having to write modules that work in both CommonJS and the browser?
wycats
2010-12-12 13:33:17 -08:00
eefd0deb6d
Merge branch 'master' into rewrite
wycats
2010-12-11 19:11:56 -08:00
9fcd85bbac
Allow helperMissing to apply to simple mustaches (paves the way to support things like link_to in a Rails context)
wycats
2010-12-11 18:43:58 -08:00
62cea5b05e
Make sure rspec returns the right line number from library files
wycats
2010-12-11 18:29:05 -08:00
215754c268
Make helperMissing a built-in feature
wycats
2010-12-11 18:28:37 -08:00
5097c18912
Make it possible to register helpers and partials and then skip passing in the helpers or partials later
wycats
2010-12-11 18:10:56 -08:00
fdc8e425d0
Improve compiling infrastructure, and restore a bit of duplication in spec_helper to make debugging easier in test failures
wycats
2010-12-11 18:10:26 -08:00
9846fb8a28
Got Qunit tests running through RSpec and fixed a bunch of bugs... 33 fails from the original suite to go
wycats
2010-11-28 17:36:05 -08:00
454d0a85b7
Add initial support for blocks
wycats
2010-11-26 23:45:38 -08:00
3b0970d8aa
Start working on the runtime
wycats
2010-11-25 23:32:32 -08:00
b401fc388b
Test the parser, and clean up ID having multiple parts
wycats
2010-11-25 23:32:03 -08:00
f8b245896d
Make the ID node capable of handling paths TODO: handle invalid paths in the tokenizer or parser TODO: invalidate "{{ foo/ bar }}"
wycats
2010-11-25 16:12:50 -08:00
7d0204bf9f
Add some more tests, and properly handle errors across the boundary in tests
wycats
2010-11-25 16:09:42 -08:00
4624eddf0b
The tokenizer shouldn't get into an infinite loop in certain termination conditions
wycats
2010-11-25 12:46:25 -08:00
3388962225
Fix the lexer to handle Strings with escaped quotes
wycats
2010-11-25 11:54:09 -08:00
83fa737e04
Add tests for the tokenizer using RubyRacer
wycats
2010-11-25 11:53:41 -08:00
4b2e543d2e
Remove node dependency from handlebars.js
wycats
2010-11-25 11:52:35 -08:00
7100563373
Add a Gemfile for testing
wycats
2010-11-25 11:51:50 -08:00
d97bc591a2
Restructure files to make more sense in a non-CommonJS world.
wycats
2010-11-25 02:49:08 -08:00
38f8ae84fe
Explain something in the lexer
wycats
2010-11-25 00:58:42 -08:00
85fa2cb65f
Initial commit. Note that I'm using CommonJS modules and node purely to help me develop this. If this ends up being useful, I will likely distribute the entire package as a single JS file for easier consumption in the browser.
wycats
2010-11-25 00:48:55 -08:00
d2b8e0296d
Got rid of log messages for debugging.
Alan Johnson
2010-11-20 22:03:00 -05:00
4b4c13f40d
More work on context object. Just one more failing test.
Alan Johnson
2010-11-20 21:40:35 -05:00
aa976283db
Just two more failing tests on the new constext object rewrite.
Alan Johnson
2010-11-20 17:08:06 -05:00
38d2be4cc0
Working on getting context object working.
Alan Johnson
2010-11-20 15:26:20 -05:00
f1e6acf628
Revert "Make it possible for helpers to let downstream helpers know what the path to the current object is"
wycats
2010-11-19 11:59:44 -08:00
71dffd95c7
Make it possible for helpers to let downstream helpers know what the path to the current object is
wycats
2010-11-17 18:34:37 -08:00
766497bb55
Add support for multiple params and String literals
wycats
2010-11-17 16:12:24 -08:00
c54cadcf8f
Fixed strange stack issue.
Alan Johnson
2010-11-05 15:57:59 -04:00
82529f5051
Fixed issue where stack isn't passed into partials and also fixed null issue in complex expressions.
Alan Johnson
2010-11-05 13:56:27 -04:00
45c961afc8
Fixed memoization collision with built in methods. Thanks alphabj\!
Alan Johnson
2010-10-22 16:10:12 -04:00
5e18cb6298
Remove extraneous breaks
Jason Davies
2010-10-19 12:25:47 +01:00