kpdecker
84049bf0c5
Add includeZero flag to if conditional
...
Allows for users who desire non-falsy handling of numbers to utilize if while maintaining the legacy if behavior.
Fixes #608
2013-10-14 21:38:19 -05:00
kpdecker
9218f2e1ef
Fix improper stash
2013-10-14 14:49:55 -05:00
kpdecker
15e1eb36ca
Fix case typo
2013-10-14 14:38:10 -05:00
kpdecker
15500aef70
Access utils methods via modules
...
Allows for monkey patching (under ES5 systems). This somewhat mirrors
the proposed behavior in https://github.com/square/es6-module-transpiler/issues/37
but applies the behavior via manual code changes rather than compiler
support.
2013-10-14 11:50:18 -05:00
Dennis Kuczynski
3150ef15da
Remove uncessary ? operator when returning boolean values for @first and @last
2013-10-12 16:43:46 -05:00
denniskuczynski
e20591b49d
Add @first and @last data variables to #each helper resolving Issue #483
2013-10-12 16:43:17 -05:00
kpdecker
4d31df2f30
Update logger interface to expose prior API
2013-10-12 15:41:38 -05:00
kpdecker
4d7124f6bf
Remove global Handlebars references
2013-10-09 03:21:21 -07:00
kpdecker
6a23391a9a
Break exception class out into a standalone module
2013-10-01 21:14:18 -05:00
kpdecker
27d9010974
Update logger for es6 modules
2013-09-30 23:52:44 -05:00
kpdecker
cb0c45b29f
Merge branch 'master' into es6-modules
...
Conflicts:
Gruntfile.js
Rakefile
dist/handlebars.js
dist/handlebars.runtime.js
lib/handlebars.js
lib/handlebars/base.js
lib/handlebars/runtime.js
lib/handlebars/utils.js
package.json
2013-09-02 18:19:18 -05:00
kpdecker
192887cedc
Merge commit '87b5d4ee61605b026506e92c9e8873d867c5f150' into es6-modules
...
Conflicts:
dist/handlebars.js
dist/handlebars.runtime.js
lib/handlebars/base.js
lib/handlebars/utils.js
2013-09-02 16:19:28 -05:00
kpdecker
6e6acaac0d
Unify isFunction/isArray handling
2013-08-24 22:20:12 -05:00
kpdecker
0af54b1142
Use extend rather than prototype for createFrame
...
Using prototype has a large performance impact for the common case of a
sparse set of private variable data points. Rather than incurring the
overhead of creating and walking the prototype tree for this, performing
an extend by copy.
2013-08-24 12:10:10 -05:00
Tuomas Palenius
db47593e34
Fix #597 . If-helper doesn't anymore consider 0 as falsy value.
2013-08-15 06:05:11 +03:00
Yehuda Katz
5f664dd78b
Make the Handlebars environment into an object
...
The idea is that the environment wraps up the mutable stuff in
Handlebars (like the helpers) and that you could theoretically create a
new one at any time and pass it in to Handlebars.template.
Every test makes a new environment and uses it in template compilation.
2013-07-26 16:50:37 +00:00
Yehuda Katz
f5c8484ea0
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.
2013-07-24 05:03:27 +00:00
Yehuda Katz
da130f7745
Building an AMD file
2013-07-16 19:10:37 +00:00
Yehuda Katz
88ee4757e7
Initial work on ES6 modules
2013-07-01 13:59:58 -07:00
kpdecker
f63b226b76
Update to 1.0.0 final
2013-05-31 14:16:45 -04:00
kpdecker
16fd601a5c
Merge global and passed helpers and partials
2013-05-31 13:12:06 -04:00
kpdecker
c540d7186a
Allow function arguments to with and each
...
Via @mcdan
Fixes #239
2013-05-29 12:23:55 -04:00
kpdecker
293672432b
improve error message on missing helper
...
Via @stefanpenner
Fixes #523
2013-05-29 10:57:48 -04:00
kpdecker
533be694b5
Use better variable name
2013-05-21 13:12:11 -05:00
kpdecker
ddc4d31861
Rev to rc4
2013-05-13 23:07:29 -05:00
kpdecker
4429ffa9f3
Allow multiple partial and helper registration
...
Fixes #369
2013-04-07 18:04:51 -05:00
kpdecker
0329c852bd
Merge branch 'program-metadata'
2013-04-07 12:29:54 -05:00
Kevin Decker
21977633a0
Merge pull request #213 from thejohnfreeman/master
...
Block helper "with" should check for empty context
2013-03-13 19:54:26 -07:00
kpdecker
baccdb4cfc
Add program metadata
...
Include program id and depth on the generated wrapper objects. This
allows helpers who are passed these objects to differentiate between
helpers for cases where they may want to cache the generated DOM
structure.
2013-02-17 04:27:42 -06:00
kpdecker
c95b3d6fc5
Create new options object for unless nesting
...
Fixes #343
2013-02-16 16:18:48 -06:00
kpdecker
1f76b065fc
browser-prefix/suffix templates
2013-02-16 13:07:39 -06:00
kpdecker
e3454a0187
Restore module scope in base.js
2013-02-15 19:41:10 -06:00
kpdecker
f72cbed479
Merge branch 'master' of github.com:tommydudebreaux/handlebars.js into tommydudebreaux-master
2013-02-15 19:24:15 -06:00
Peter Wagenet
bc8214cb7c
Updated to 1.0.0-rc.3
2013-02-14 21:58:20 -08:00
Tommy Messbauer
7f9e3fea81
tests passing
2013-02-11 23:13:37 -06:00
Tommy Messbauer
1ca7462497
merge
2013-02-11 23:00:47 -06:00
Peter Wagenet
7c633b604d
Better error messages for precompiler runtime mismatch
2013-02-09 19:25:53 -08:00
Peter Wagenet
51e9259fac
Decouple compiler version checks from release versions
2013-02-08 18:42:20 -08:00
tomhuda
9453c6d9d2
Update version
2013-01-18 17:13:40 -08:00
Tommy Messbauer
db975b42a0
Merged upstream master and ran unit tests
2012-11-26 10:26:15 -06:00
Tommy Messbauer
7963218495
Factory update with tabs to spaces.. sorry :(
2012-11-26 09:39:08 -06:00
Spike Brehm
2676efb222
overzealous approach to implmenting Handlebars.logger.log and 'log' helper.
2012-10-20 15:26:57 -07:00
Ross Hadden
9589ab8949
Implemented ability to iterate over objects, ala for-in.
...
Also added the 'key' key to looped objects.
My goal is to make this {{@key}}, but am still working on it.
I would also like to unobtrusively make @key or @index work for arrays.
2012-10-15 10:27:56 -04:00
Tommy Messbauer
7c4813b417
Commiting initial factory code
2012-08-29 12:48:22 -05:00
Karl Westin
acc04c2826
Fixed an issue where {{#array}} {{/array}} wouldn't pass in an
...
@index data variable.
I just thought it would be nice to add in this feature. I'm using
the two of these a little interchangable, so if other people are doing
that as well, it might help usability.
2012-08-27 12:55:55 -07:00
kpdecker
fc99d90337
Fix loading under node
2012-07-23 13:48:27 -05:00
tomhuda
f79af6bfa3
Merge branch 'master' of github.com:wycats/handlebars.js
2012-07-12 10:07:10 -07:00
Yehuda Katz
5e8be14d78
Add support for @index in #each
2012-07-05 22:43:50 -07:00
tomhuda
92b6c1401a
Bump version to RC1
2012-05-28 20:05:55 -07:00
tomhuda
8e70e3b58b
Don't assume execution in the top context
2012-05-26 14:47:32 -07:00