This included removing some internal version constraints. It would be
nice if package A could say "use B@2.0.0" (when both have changed), but
when they're both in the release, we need to make a release that has a
B@2.0.0-rc in it, which doesn't match that constraint. Fortunately,
constraints aren't necessary within a release anyway.
If anything, we should track these somewhere else.
And especially now, given that we publish READMEs
on Atmosphere these should definitely not be here.
In modifying getContent, we neglected the fact that parseAttrs wraps arrays in HTML.Attrs. Now we wrap arrays outside of parseAttrs near the code that modifies the attributes array for textarea contents.
Needs tests
Remove the spacebars-compiler -> spacebars and spacebars-compiler -> ui
dependencies. With those dependencies, ui cannot depend on
ui-dynamic-template, because ui-dynamic-template depends on templating,
whose build plugin depends on spacebars-compiler, who depends on
spacebars who depends on ui.
spacebars-compiler doesn't actually need to depend on ui or spacebars;
it only needs to depend on spacebars to add things to the `Spacebars`
namespace, which this commit does by factoring out the Spacebars export
into a separate `spacebars-common` package.
Remove the concept of a "Special" as a generalization of template tags in HTML parsing and the HTMLjs tree. Just call something that's parsed by hooking the HTML parser a TemplateTag. Don't wrap the return value of getSpecialTag (now getTemplateTag), just require that it be an instanceof HTMLTools.TemplateTag.
Spacebars.TemplateTag is now a subclass of HTMLTools.TemplateTag. Both support `.toJS()`. The same object returned by getTemplateTag is now inserted into the HTMLjs -- that is, the Spacebars compiler creates an HTMLTools.TemplateTag instead of it being created as a wrapper inside HTMLTools. All usages of the words "special" or "special tag" are replaced with "template tag."
Some failing tests, which are hopefully mostly just tests of the modified code that need to be ported.
The main work was replacing the use of pseudo-attributes $special and $dynamic with the new HTML.Attrs(...) / array representation. Some functions were also rewritten to use Visitors (`toJS`, old `toHTML`/`toText`/`evaluateAttributes`, `replaceSpecials` in the compiler, but not `optimize` yet or `materialize`).
Create the "blaze-tools" package to hold toJS and other functions that are useful for template parsers/compilers that need to read or generate JS.
We now no longer check whether we're at a closing
HTML tag by peeking for "</" since that would fail
if there were a {{! }} comment directly before it.
Instead, we tokenize and then rewind. Presumably
this does have an effect on compilation time but it's
probably fine. An alternative would have been to
explicitly parse {{! }} comments rather than implicitly
skipping them before generally parsing tokens.