Browse files

Merge branch 'live-docs' into dev-master

  • Loading branch information...
2 parents 0554cd2 + 2c2ec21 commit 044aac267569358720dcfc1e0af21ea5392b122d @ericf ericf committed Jan 11, 2013
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/template/docs/index.mustache
View
20 src/template/docs/index.mustache
@@ -73,15 +73,15 @@ YUI().use('template-base', 'handlebars', function (Y) {
<h3>Generic Template API</h3>
<p>
-`Y.Template` exists to specifically to provide its API as a normalization layer on top of conceptually similar, but technically different template engines and syntaxes. This layer of abstraction allows components which work with templates to not be tied to a particular engine. Another huge benefit is allowing developers to override a component's default templates using an entirely different template engine.
+`Y.Template` exists specifically to provide its API as a normalization layer on top of conceptually similar, but technically different template engines and syntaxes. This layer of abstraction allows components which work with templates to not be tied to a particular engine. Another huge benefit is allowing developers to override a component's default templates using an entirely different template engine.
</p>
<p>
-The two templates engines provided in YUI, Handlebars and Template.Micro, are conceptually similar. They both compile string-based templates into functions, which are invoked with a data context and return the rendered output as a string. Handlebars is really well suited for organizing and managing the templates of an entire app or complex widget because of its partials and helpers features. Template.Micro is great for small templates, or when you need more powerful templates and its compilation engine is <em>extremely</em> small.
+The two template engines provided in YUI, Handlebars and Template.Micro, are conceptually similar. They both compile string-based templates into functions, which are invoked with a data context and return the rendered output as a string. Handlebars is really well suited for organizing and managing the templates of an entire app or complex widget because of its partials and helpers features. Template.Micro is great for small templates, or when you need more powerful templates and its compilation engine is <em>extremely</em> small.
</p>
<p>
-By making Template.Micro's public API very similar to Handlebars, we've made it possible to use the two template engines interchangeably via the `Y.Template` normalization API. When you need to compile templates on the client, it is <strong>strongly recommend</strong> that you use Micro templates, because Template.Micro's compile is <em>much</em> smaller than Handlebars' compiler &mdash; 0.5KB vs 9KB (minified and gzipped) respectively.
+By making Template.Micro's public API very similar to Handlebars, we've made it possible to use the two template engines interchangeably via the `Y.Template` normalization API. When you need to compile templates on the client, it is <strong>strongly recommend</strong> that you use Micro templates, because Template.Micro's compiler is <em>much</em> smaller than Handlebars' compiler &mdash; 0.5KB vs 9KB (minified and gzipped) respectively.
</p>
<h3>Instantiating a Template Engine</h3>
@@ -315,7 +315,7 @@ For more details, refer to the Precompiling and Reviving Templates sections of t
<h3>Creating a Custom Template Engine</h3>
<p>
-The generic `Y.Template` interface is [[#Generic Template API|designed]] to worked with for variety of string -> function template engines. To implement a custom underlaying template engine for `Y.Template`, refer to the following list of methods and their descriptions which need to be implemented:
+The generic `Y.Template` interface is [[#Generic Template API|designed]] to work with a variety of string -> function template engines. To implement a custom underlaying template engine for `Y.Template`, refer to the following list of methods and their descriptions which need to be implemented:
</p>
<dl>
@@ -344,7 +344,7 @@ The generic `Y.Template` interface is [[#Generic Template API|designed]] to work
<dt>`precompile( text , [options] )`</dt>
<dd>
<p>
- Precompiles a string template into a new string containing JavaScript source code for the precompiled template and returns it to the caller. The `revive()` method this method's companion, it converts the precompiled template back into a renderable function.
+ Precompiles a string template into a new string containing JavaScript source code for the precompiled template and returns it to the caller. The `revive()` method is this method's companion, it converts the precompiled template back into a renderable function.
</p>
<p>
@@ -716,7 +716,7 @@ Y.mix(Y.Template.Micro.options, {
<h2>Using Templates in Custom Components</h2>
<p>
-When created custom components for your app, it's natural to bundle the templates with the component that will use them. The following examples show how create a custom view component which use templates.
+When creating custom components for your app, it's natural to bundle the templates with the component that will use them. The following examples show how to create a custom view component which uses templates.
</p>
<h3>Custom View with Embeded Template</h3>
@@ -766,7 +766,7 @@ YUI().use('template-micro', 'view', function (Y) {
<h3>Custom View with External Template</h3>
<p>
-Usually embedding the template in your component's JavaScript code is bad practice. The following examples show two way to externalize a component's templates.
+Usually embedding the template in your component's JavaScript code is bad practice. The following examples show two ways to externalize a component's templates.
</p>
<h4>Defining Templates in HTML</h4>
@@ -842,7 +842,7 @@ YUI.add('animalListTemplate', function (Y) {
```
```javascript
-// Defines a YUI module defines our view and requires our template module.
+// Defines a YUI module which defines our view and requires our template module.
YUI.add('animalListView', function (Y) {
var AnimalListView = Y.Base.create('animalListView', Y.View, [], {
render: function () {
@@ -901,11 +901,11 @@ Make sure not to embed too much logic in your templates, things can get out of c
<h3>Externalize Templates</h3>
<p>
-Avoid embedding huge templates string in your JavaScript code. Strive to separate your templates from the code the uses them, having your templates specified in separate files is best. The [[#Defining Templates in a Module|template module example]] above would ideally use a build-time process to wrap the template source with the YUI module registration wrapper.
+Avoid embedding huge template strings in your JavaScript code. Strive to separate your templates from the code that uses them, having your templates specified in separate files is best. The [[#Defining Templates in a Module|template module example]] above would ideally use a build-time process to wrap the template source with the YUI module registration wrapper.
</p>
<h3>Compile Once, Render Often</h3>
<p>
-Template [[#Instantiating a Template Engine|compliation is expensive]]. You should avoid compiling a template more than once. Ideally, you are [[#Precompiling and Reviving Templates|precompiling templates]] on the server or during a build-time process to avoid the compilation step on the client.
+Template [[#Instantiating a Template Engine|compilation is expensive]]. You should avoid compiling a template more than once. Ideally, you are [[#Precompiling and Reviving Templates|precompiling templates]] on the server or during a build-time process to avoid the compilation step on the client.
</p>

0 comments on commit 044aac2

Please sign in to comment.