Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Release 0.0.2

  • Loading branch information...
commit f97046ff6e193a680cf0f9fe524b35ca1c0f2b59 1 parent 6203f80
@matthewmueller authored
Showing with 15 additions and 18 deletions.
  1. +4 −0 History.md
  2. +10 −17 Readme.md
  3. +1 −1  component.json
View
4 History.md
@@ -1,4 +1,8 @@
+0.0.2 / 2012-11-07
+==================
+
+* removed template support
0.0.1 / 10-21-2012
==================
View
27 Readme.md
@@ -2,12 +2,12 @@
Generic list component, based on the [menu component](https://github.com/component/menu).
-Useful for creating inboxes, contact lists, etc.
+Useful for creating inboxes, contact lists, etc.
![list example](http://f.cl.ly/items/0R073N0e1f0b0a390z3Y/Screen%20Shot%202012-10-21%20at%201.51.31%20PM.png)
![inbox example](http://f.cl.ly/items/0G091L250Q2c0n002b0b/Screen%20Shot%202012-10-21%20at%204.40.04%20PM.png)
-
+
## Installation
$ component install matthewmueller/list
@@ -43,9 +43,12 @@ Useful for creating inboxes, contact lists, etc.
```js
var List = require('list'),
- inbox = new List;
+ inbox = new List,
+ hogan = require('matthewmueller-hogan'),
+ message = document.getElementById('message').text,
+ tpl = hogan.compile(message);
-inbox.template(document.getElementById('message').text)
+inbox.template(tpl)
var messages = [
{ from : 'jim', subject : 'hey', message : 'blah'},
@@ -80,7 +83,7 @@ inbox.add({
inbox.remove(3);
```
-## API
+## API
### List()
@@ -92,19 +95,9 @@ var list = new List(); // or...
var list = List();
```
-### List#template(str)
-
-Add a template string to be used when adding items. The default templating engine is [minstache](https://github.com/visionmedia/minstache).
-
-```js
-list.template('<li><a href={url}>{text}</a></li>')
-```
-
-You can use another templating engine by overwriting the engine attribute. If you'd like to use hogan.js, check out [matthewmueller/hogan](https://github.com/MatthewMueller/hogan)
+### List#template(fn)
-```js
-list.engine = require('hogan');
-```
+Add a template `fn` to be used when adding items.
### List#add(arr | obj, [fn])
View
2  component.json
@@ -2,7 +2,7 @@
"name": "list",
"repo": "matthewmueller/list",
"description": "Generic list component",
- "version": "0.0.1",
+ "version": "0.0.2",
"keywords": [],
"dependencies": {
"component/jquery" : "*",
Please sign in to comment.
Something went wrong with that request. Please try again.