Skip to content
Browse files

minor additionals to readme

  • Loading branch information...
1 parent 31e5743 commit fd21e9088540d9dbc0789468d233aee66666ba4c @addyosmani committed May 14, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
View
6 README.md
@@ -2,6 +2,8 @@ A very compact micro-templating solution created for learning purposes.
### Sample usage
+Example 1: Basic templating
+
```javascript
var markup1 = "Test 1: I am a {{user.age}} year old {{user.sex}} from {{country}}",
data1 = {
@@ -17,6 +19,8 @@ A very compact micro-templating solution created for learning purposes.
```
+Example 2: Populating a separately defined template
+
```javascript
<script type="text/micro" id="test">
<img src = "{{avatar}}" title = "{{username}}" alt = "{{username}}" />
@@ -36,6 +40,8 @@ A very compact micro-templating solution created for learning purposes.
```
+Example 3: Templating a multi-dimensional array
+
```javascript
var markup3 = "<li><b>{{Name}}</b> ({{ReleaseYear}})</li>",
buffer = "";

0 comments on commit fd21e90

Please sign in to comment.
Something went wrong with that request. Please try again.