yui/yui3 — pull request #1025 by clarle (2013-07-24 17:22:31+00:00)
Title: Template registration, first implementation

As discussed in #1021 and the linked gist.

Here's a first drop for template registration, including full tests, user guide documentation, and API docs.

@ericf and I were discussing a possible addition to the `Y.Template.register` API, where it would also accept a hash of template names to template functions. For example:

```js
Y.Template.register({
'foo': fooTemplate,
'bar': barTemplate,
'baz': bazTemplate
});
```

I started implementing something like this, but I wasn't sure what `Y.Template.register(templateHash)` would return. The current `Y.Template.register(templateName, template)` returns the revived template to maintain compatibility with the `revive()` API.

Pinging @caridy also for review.