kpdecker
eb53f2e844
Allow extend to work with non-prototyped objects
...
ES6 modules do not extend the Object prototype so this blows up under the latest version of the transpiler.
2013-12-01 11:36:28 -06:00
kpdecker
47d13cb23c
v1.1.2
2013-11-05 18:10:06 -06:00
kpdecker
affbcbb79e
Unify isArray/isFunction/toString implementations
...
Restores Array.isArray polyfill for all use cases.
Fixes #645
2013-11-05 18:07:33 -06:00
kpdecker
09cdc19a21
v1.1.1
2013-11-04 10:48:59 -06:00
kpdecker
29e3858d21
v1.1.0
2013-11-03 21:25:46 -06:00
kpdecker
c70e897f1c
Move component definitions into sub directory
2013-11-03 15:49:05 -06:00
kpdecker
ded0a1617f
Protect context-lookups from undefined values
...
Fixes #166
Fixes #587
2013-11-03 10:58:37 -06:00
kpdecker
c776f171ab
Implement strip opcode
2013-10-14 22:50:50 -05:00
kpdecker
6b0b3fa2ca
Defer content output
...
Allows for stripping of the content after the fact.
2013-10-14 22:50:50 -05:00
kpdecker
1de6cee1b2
Load strip flags from lex stream
2013-10-14 22:50:50 -05:00
kpdecker
151e6d49c0
Wrap AST nodes in strip opcodes if defined
2013-10-14 22:50:50 -05:00
kpdecker
14ef86f9ca
Use accept for all compiler traversal
2013-10-14 22:50:50 -05:00
kpdecker
a1edab6ef5
Kill unused functions
2013-10-14 22:50:50 -05:00
kpdecker
4cf49732a2
Push Source helper method
2013-10-14 22:50:49 -05:00
kpdecker
0cc6e270f9
Pass open token to MustacheNode for flag parsing
2013-10-14 22:50:12 -05:00
kpdecker
06d94fed56
Fix argument not found error
2013-10-14 22:49:34 -05:00
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
4fda71364e
Pass options hash to context function exec
...
Fixes #599
2013-10-14 21:30:58 -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
7ee0c10c10
Fix transpiler error in printer.js
2013-10-12 15:40:55 -05:00
kpdecker
9769045e04
Cleanup unused var warnings
2013-10-09 03:53:09 -07:00
kpdecker
4d7124f6bf
Remove global Handlebars references
2013-10-09 03:21:21 -07:00
kpdecker
b6c9f85d22
Use template env and compile methods
2013-10-09 03:20:22 -07:00
Alex Navasardyan
19f1a1f81d
fixing jshint errors
2013-10-04 14:28:05 -04:00
kpdecker
db0f03d1b5
Remove empty file
2013-10-01 21:41:18 -05:00
kpdecker
fd09ff0e1b
Expose current Handlebars namespace fields
2013-10-01 21:41:09 -05:00
kpdecker
e676e43dc5
Use proper default vs. module import semantics
2013-10-01 21:19:49 -05:00
kpdecker
e75839b185
Break safe string out into standalone module
2013-10-01 21:18:10 -05:00
kpdecker
6a23391a9a
Break exception class out into a standalone module
2013-10-01 21:14:18 -05:00
kpdecker
80b748ad3e
Fix global Handlebars references
2013-10-01 00:13:48 -05:00
kpdecker
27d9010974
Update logger for es6 modules
2013-09-30 23:52:44 -05:00
kpdecker
1e8409efa6
Fix merge errors
2013-09-02 18:25:03 -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
623fdad59f
Simplify falsy handling
2013-08-24 22:20:23 -05:00
kpdecker
6e6acaac0d
Unify isFunction/isArray handling
2013-08-24 22:20:12 -05:00
kpdecker
4c02d3027c
Optimize partial helper/partial merge handling
2013-08-24 19:52:22 -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
kpdecker
eb1cda6fdc
jshint
2013-08-24 12:06:25 -05:00
kpdecker
564afab278
Merge branch 'master' of github.com:artiee/handlebars.js into artiee-master
2013-08-15 10:24:28 -05:00
Parker Selbert
d02c90c0fb
Use the ('' + string) form of string coercion
...
Using string.toString() will throw errors in current versions of Safari
(6.0.5 currently) for some values. The error is a particularly cryptic
"Type Error: type error", which no indication as to the value that
caused the error. By using the '' + string form of coercion the error
doesn't seem to occur.
Depending on the browser used there is a sizable performance increase
in using the concatenation form of coercion. In instances where there
is not a performance improvement (i.e. Firefox), the speed difference
is entirely negligable. See: http://jsperf.com/convert-to-string-bj/3
2013-08-14 22:11:59 -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
kpdecker
9ca4f9c606
Remove unused var
2013-07-30 11:08:26 -05: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