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
95d5768e0e
Expose printer and visitor objects in node
2013-10-12 15:41:15 -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
kpdecker
855eae37d0
Create runtime specific module
2013-10-09 02:38:04 -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
6f580c9beb
Global Handlebars.compile uses its env
...
The basic strategy is that there will be a global Handlebars object for
the browser build, and that object will have a `compile` on it which
uses its environment in the compiler.
It will also be possible to glue things together manually by using the
AMD build and passing the environment to `compile` directly. Some of
these details are TBD.
2013-07-26 18:08:32 +00:00
Yehuda Katz
d33408fcbd
Move more testing mutations into the environment
2013-07-26 17:18:56 +00: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
12f8299eb2
More modularization
2013-07-02 18:57:28 +00:00
Yehuda Katz
88ee4757e7
Initial work on ES6 modules
2013-07-01 13:59:58 -07:00
kpdecker
c3ff573184
Break JavascriptCompiler into standalone file
2013-06-03 23:27:35 -05:00
kpdecker
6174c3b6f8
Remove unnecessary function
2013-06-02 23:36:34 -05:00
Kevin Decker
caded1d06b
Merge pull request #537 from spikebrehm/support-all-the-modules
...
Support AMD and CommonJS out of the box
2013-05-31 12:37:16 -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
d7b345b2da
Allow execution of helpers on the context
...
Fixes #285
2013-05-30 15:47:30 -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
da2aabe7bd
Allow ID, STRING, or INTEGER for partial name
...
Fixes #519
2013-05-29 10:46:28 -04:00
kpdecker
3ddbc5237f
Protect from object prototype modifications
...
Fixes #534
2013-05-28 17:03:07 -04:00
kpdecker
503e32208b
Improve tracking of original path values
2013-05-27 19:47:17 -04:00
kpdecker
822a8911ec
Add support for complex ids in @data references
2013-05-27 14:40:52 -05:00
Spike Brehm
efca3c8ef5
Support AMD and CommonJS out of the box
2013-05-27 11:22:25 -07:00