diff --git a/README.md b/README.md
index fce97dd..ff67441 100644
--- a/README.md
+++ b/README.md
@@ -9,17 +9,17 @@ View all feature comparisons and templates on the [Node Templates Page](http://p
## Implemented Libraries
(_Alphabetical Order_)
-
* [coffeekup@0.3.0](http://coffeekup.org/)
-* [dust@0.3.0](http://akdubya.github.com/dustjs/)
-* [ejs@0.4.2](https://github.com/visionmedia/ejs)
+* [dust.js@0.1.0](https://github.com/stanislavfeldman/dust.js), until [dust](http://akdubya.github.com/dustjs/) supports node > 0.4
+* [ejs@0.6.1](https://github.com/visionmedia/ejs)
* [haml@0.4.2](https://github.com/creationix/haml-js)
-* [hamljs@0.5.1](https://github.com/visionmedia/haml.js)
-* [jade@0.16.0](http://jade-lang.com/)
-* [jqtpl@1.0.6](https://github.com/kof/node-jqtpl)
+* [hamljs@0.5.2](https://github.com/visionmedia/haml.js)
+* [jade@0.20.0](http://jade-lang.com/)
+* [jqtpl@1.0.7](https://github.com/kof/node-jqtpl)
* [mu2@0.5.3](https://github.com/raycmorgan/Mu)
-* [swig@0.5.0](https://github.com/paularmstrong/swig)
-* [Templ8@0.2.1](https://github.com/constantology/Templ8)
+* [swig@0.9.0](https://github.com/paularmstrong/swig)
+* [Templ8@0.3.0](https://github.com/constantology/Templ8)
+* [whiskers@0.1.2](https://github.com/gsf/whiskers.js)
## Running
diff --git a/index.html b/index.html
index 3094fe7..5660a61 100644
--- a/index.html
+++ b/index.html
@@ -30,6 +30,7 @@
Pages
Template Languages (alphabetical)
- CoffeeKup - Markup as CoffeeScript.
+ - dustjs - templates that work in node.js or browser-side
- EJS - Embedded JavaScript templates
- Haml-js - Haml ported to server-side Javascript. This is a traditional server-side templating language.
- Haml.js - Faster / Express compliant Haml implementation
@@ -51,6 +52,7 @@ Feature Comparisons
| (click to toggle) |
CoffeeKup |
+ dustjs |
EJS |
Haml-js |
Haml.js |
@@ -67,6 +69,7 @@ Feature Comparisons
Express Support |
✔ |
✔ |
+ ✔ |
✖ |
✔ |
✔ |
@@ -79,6 +82,7 @@ Feature Comparisons
| Browser Support |
✔ |
+ ✔ |
✖ |
✔ |
✔ |
@@ -101,11 +105,13 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
| Variable Filters |
✖ |
✔ |
+ ✔ |
✖ |
✖ |
✖ |
@@ -119,6 +125,7 @@ Feature Comparisons
Shorthand HTML Syntax |
✔ |
✖ |
+ ✖ |
✔ |
✔ |
✔ |
@@ -134,6 +141,7 @@ Feature Comparisons
✖ |
✖ |
✖ |
+ ✖ |
✔ |
✖ |
✖ |
@@ -151,6 +159,7 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
✖ |
✖ |
@@ -166,6 +175,7 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
if/else Conditionals |
@@ -175,6 +185,7 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
✜ |
✔ |
✔ |
@@ -185,6 +196,7 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
✖ |
✔ |
✖ |
@@ -196,6 +208,7 @@ Feature Comparisons
| Extendable Tags, Logic, and/or Filters |
✔ |
+ ✔ |
✖ |
✖ |
✖ |
@@ -218,6 +231,7 @@ Feature Comparisons
✔ |
✔ |
✔ |
+ ✔ |
diff --git a/lib/languages/dustjs.js b/lib/languages/dustjs.js
new file mode 100644
index 0000000..63960b4
--- /dev/null
+++ b/lib/languages/dustjs.js
@@ -0,0 +1,26 @@
+var dust = require('dust.js'),
+ fs = require('fs'),
+ data = {
+ header: 'Colors',
+ items: [
+ {name: 'red', current: true, url: '#Red'},
+ {name: 'green', current: false, url: '#Green'},
+ {name: 'blue', current: false, url: '#Blue'}
+ ]
+ },
+ files = {
+ simple: fs.readFileSync(__dirname + '/../templates/dustjs/simple.html', 'utf8')
+ },
+ tpl = {};
+
+exports.compile = function (type, callback) {
+ if (!tpl[type]) {
+ tpl[type] = dust.compile(files[type], type);
+ dust.loadSource(tpl[type]);
+ }
+ callback();
+};
+
+exports.render = function (type, callback) {
+ dust.render(type, data, callback);
+};
diff --git a/lib/templates/dustjs/simple.html b/lib/templates/dustjs/simple.html
new file mode 100644
index 0000000..3533d76
--- /dev/null
+++ b/lib/templates/dustjs/simple.html
@@ -0,0 +1,14 @@
+{header}
+{#items}
+
+{#item}
+ {^current}
+ - {name}
+ {:else}
+ - {name}
+ {/current}
+{/item}
+
+{:else}
+The list is empty.
+{/items}
diff --git a/package.json b/package.json
index 69c9008..b806263 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"repository": "https://github.com/paularmstrong/node-templates.git",
"homepage": "http://paularmstrong.github.com/node-templates/",
"author": "Paul Armstrong ",
+ "contributors" : ["Scott Sanders "],
"dependencies": {
"nopt": ">=1.0.8",
"bench": ">=0.3.2",
@@ -18,9 +19,12 @@
"jade": "0.16.0",
"jqtpl": "1.0.6",
"mu2": "0.5.3",
- "swig": "0.7.0",
- "Templ8": "0.2.1",
- "whiskers": "0.1.0"
+ "swig": "0.9.0",
+ "Templ8": "0.3.0",
+ "whiskers": "0.1.2",
+ "dust.js": "0.1.0",
+ "abbrev": "1.0.3",
+ "coffee-script": "1.2.0"
},
"main": "index",
"engines": {