Commit Graph

24 Commits

Author SHA1 Message Date
David Greenspan
e42ad696df Ban templates named after macros like “dynamic” 2014-09-18 17:34:56 -07:00
David Greenspan
855284559a Back-compat tests 2014-09-18 17:29:04 -07:00
David Greenspan
e7cf040177 Rename {{> UI.*}} to Template; remove UI uses
Rename inclusion macros (with back-compat) to: Template.dynamic, Template.contentBlock, Template.elseBlock.

Update all uses and mentions of UI in the repo, unless they are there for back-compat or testing reasons.

To do: Run unit tests.  Update docs for UI.dynamic.  Document Template.contentBlock and Template.elseBlock.
2014-09-17 17:24:25 -07:00
David Greenspan
307b9a9504 Make more Blaze calls private
Put underscores before:

ReactiveVar, InOuterTemplateScope, EventSupport, reportException,
wrapCatchingExceptions, DOMMaterializer, and HTMLJSExpander
2014-08-11 14:38:46 -07:00
David Greenspan
7ca944e665 UI.render/toHTML, TemplateWith, Blaze.toText
Move Spacebars.TemplateWith to Blaze._TemplateWith.  It is the official
way to give a template data, after all, but it’s a little too weird to
make public.  Use it in Blaze.renderWithData, even though it doesn’t
seem like it would make a difference.

Unify UI.render/renderWithData with Blaze.render, and add
toHTMLWithData.  Publicly, they take a Template or a View.
The View must be unrendered, of course.  If given a Template,
constructView will be called.  Privately, they take any HTMLJS
extended to be allowed to contain Templates and Views, except
null or undefined, or a function returning extended HTMLJS.
The “data” argument may be a function or a not, as in UI.With
(and unlike the old public UI.renderWithData).

Make Blaze.toText private (Blaze._toText).
2014-08-11 14:24:07 -07:00
David Greenspan
734816c7d7 Cleaner codegen of attribute values 2014-07-01 10:57:46 -07:00
David Greenspan
284529992e Fix UI.contentBlock data context 2014-07-01 10:25:48 -07:00
David Greenspan
0766b13ba8 Fix block helpers 2014-06-30 19:13:10 -07:00
David Greenspan
ab4bb8f993 Get rid of 3s/OLDSTYLE, start to exclude old code 2014-06-30 15:45:12 -07:00
David Greenspan
9dd5fac49c webapp_server works
This confirms that we can convert complicated templates (including #if, #each, and dynamic attributes) into HTML using Views.

Template#__lookup was moved to View#lookup, since webapp_server is an example of a case where we have lookup but no template!

Next steps: get rid of the “3” after some names, the OLDSTYLE flag, and dead code in the blaze package.  Then make Template features like events, `helper`, etc. work.
2014-06-30 15:36:33 -07:00
David Greenspan
85b80d3266 Implement lookup, more builtins
Move lookup to templates, not views!
2014-06-26 18:23:31 -07:00
David Greenspan
c01a9df8de Introduce OLDSTYLE flag to not break webapp
Making webapp_server work requires #if and #each that work with toHTML.  Don’t want to have to write that code just to be able to run client code again.
2014-06-26 15:54:40 -07:00
David Greenspan
0940e4dde8 Spacebars.include2 -> Spacebars.include 2014-06-21 18:21:50 -07:00
David Greenspan
99d6545d70 Spacebars.With2 -> Spacebars.With 2014-06-21 18:20:36 -07:00
David Greenspan
72d9cb9b90 Fix {{> content}} data context 2014-06-21 18:16:12 -07:00
David Greenspan
4e8472e970 Proper reactivity for calculated templates 2014-06-09 16:35:24 -07:00
David Greenspan
9108c5debd Match devel’s behavior for inclusion arg context 2014-06-09 14:02:46 -07:00
David Greenspan
1365e63ff8 Start to make custom block helpers work
UI.contentBlock
2014-06-09 12:18:48 -07:00
Emily Stark
4dc2cb6e31 Port UI.dynamic to blaze-refactor 2014-06-06 15:20:29 -07:00
David Greenspan
cff3b175c0 try to fix Spacebars.include2 2014-06-06 12:07:50 -07:00
David Greenspan
38f5932b81 Basic template inclusions work
Events are not attached.

contentBlock doesn’t work.
2014-05-13 18:02:24 -07:00
David Greenspan
bc4339c1dc Replace old codegen with codegen2 2014-05-06 14:30:48 -07:00
David Greenspan
91f279859c comment 2014-05-03 19:21:28 -07:00
David Greenspan
5d09079393 Re-org spacebars-compiler package
Make {codegen,compiler}.js, Spacebars.CodeGen class

Make more internals accessible to the outside
2014-05-03 19:05:36 -07:00