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."
- Start shrinking html.js down to the 150-line file it can be
- Move "proper case" logic to the template compiler; the tagName of an HTMLjs tag is now in proper case. This is both for better performance and reduced size and complexity of runtime code (i.e. blaze.js).
- Start moving html-tools to the HTMLTools namespace
... unless you ask for it by name, in which case it can run on the client.
This means a smaller JS payload in production, without the HTML parser or Spacebars codegen.
Puts HTML.Tag, toHTML, and toJS in the "htmljs" package.
Introduces toText for textareas and attributes.
Changes dynamic attribute representation.
Instances of HTML.Tag, HTML.CharRef, etc. are now "instanceof".
Once this code seems to work, we'll move packages around further.
- "htmljs" is the runtime; can even take out "tocode.js"
- "html-tools" (new package) takes over for "html".
Then, port the tests.