Permalink
Browse files

dust is not compatible with node >0.5.x

  • Loading branch information...
1 parent 47c7a4f commit ec1cc2420b6cdedb149b2545994a635de85c321a @paularmstrong committed Dec 11, 2011
Showing with 5 additions and 73 deletions.
  1. +5 −23 index.html
  2. +0 −37 lib/languages/dust.js
  3. +0 −12 lib/templates/dust/simple.html
  4. +0 −1 package.json
View
28 index.html
@@ -30,7 +30,6 @@
<h2>Template Languages <span>(alphabetical)</span></h2>
<ul>
<li><a href="http://coffeekup.org/">CoffeeKup</a> - Markup as CoffeeScript.</li>
- <li><a href="http://akdubya.github.com/dustjs/">Dust</a> - Asynchronous templates for the browser and node.js</li>
<li><a href="https://github.com/visionmedia/ejs">EJS</a> - Embedded JavaScript templates</li>
<li><a href="https://github.com/creationix/haml-js">Haml-js</a> - Haml ported to server-side Javascript. This is a traditional server-side templating language.</li>
<li><a href="https://github.com/visionmedia/haml.js">Haml.js</a> - Faster / Express compliant Haml implementation</li>
@@ -52,7 +51,6 @@
<tr>
<th>(click to toggle)</th>
<th scope="col">CoffeeKup</th>
- <th scope="col">Dust</th>
<th scope="col">EJS</th>
<th scope="col">Haml-js</th>
<th scope="col">Haml.js</th>
@@ -68,7 +66,6 @@
<tr>
<th scope="row">Express Support</th>
<td><span class="yes">✔</span></td>
- <td><a class="partial" href="#dust-express">✜</a></td>
<td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
@@ -82,7 +79,6 @@
<tr>
<th scope="row">Browser Support</th>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
@@ -105,13 +101,11 @@
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
</tr>
<tr>
<th scope="row">Variable Filters</th>
<td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
@@ -125,7 +119,6 @@
<th scope="row">Shorthand HTML Syntax</th>
<td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
- <td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
@@ -141,7 +134,6 @@
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
- <td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
@@ -159,7 +151,6 @@
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
</tr>
@@ -175,7 +166,6 @@
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
</tr>
<tr>
<th scope="row"><code>if/else</code> Conditionals</th>
@@ -185,7 +175,6 @@
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
<td><a class="partial" href="#mu-ifelse">✜</a></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
@@ -194,7 +183,6 @@
<tr>
<th scope="row"><code>else if</code> Conditionals</th>
<td><span class="yes">✔</span></td>
- <td><span class="no">✖</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
@@ -208,7 +196,6 @@
<tr>
<th scope="row">Extendable Tags, Logic, and/or Filters</th>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
<td><span class="no">✖</span></td>
@@ -231,32 +218,27 @@
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
<td><span class="yes">✔</span></td>
- <td><span class="yes">✔</span></td>
</tr>
</tbody>
<tfoot>
<tr>
- <th colspan="12">Footnotes</th>
- </tr>
- <tr id="dust-express">
- <th><span class="partial">✜ Dust Express Support</span></th>
- <td colspan="11">Dust can be supported in Express via <a href="https://github.com/davglass/express-dust">express-dust</a></td>
+ <th colspan="11">Footnotes</th>
</tr>
<tr id="jqtpl-browser">
<th><span class="partial">✜ JQTpl Browser Support</span></th>
- <td colspan="11">JQTpl can be supported in the browser via the <a href="https://github.com/jquery/jquery-tmpl">jQuery Templates plugin</a></td>
+ <td colspan="10">JQTpl can be supported in the browser via the <a href="https://github.com/jquery/jquery-tmpl">jQuery Templates plugin</a></td>
</tr>
<tr id="mu-browser">
<th><span class="partial">✜ Mu Browser Support</span></th>
- <td colspan="11">Mu2/Mustache can be supported in the browser via <a href="https://github.com/janl/mustache.js">mustache.js</a>.</td>
+ <td colspan="10">Mu2/Mustache can be supported in the browser via <a href="https://github.com/janl/mustache.js">mustache.js</a>.</td>
</tr>
<tr id="mu-ifelse">
<th><span class="partial">✜ Mu <code>if / else</code></span></th>
- <td colspan="11">Mu2/Mustache only supports <code>if</code> logic.</td>
+ <td colspan="10">Mu2/Mustache only supports <code>if</code> logic.</td>
</tr>
<tr id="partials">
<th><span class="partial">✜ Partials</span></th>
- <td colspan="11">Language has some way to include and render sub-templates from within the main template.</td>
+ <td colspan="10">Language has some way to include and render sub-templates from within the main template.</td>
</tr>
</tfoot>
</table>
View
37 lib/languages/dust.js
@@ -1,37 +0,0 @@
-var dust = require('dust'),
- 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'}
- ],
- link: function () {
- return this.current !== true;
- },
- list: function () {
- return this.items.length !== 0;
- },
- empty: function () {
- return this.items.length === 0;
- }
- },
- files = {
- simple: fs.readFileSync(__dirname + '/../templates/dust/simple.html', 'utf8')
- },
- tpl = {};
-
-exports.compile = function (type, callback) {
- tpl[type] = dust.loadSource(dust.compile(files[type], type));
- callback();
-};
-
-exports.render = function (type, callback) {
- dust.render(type, data, function (error, output) {
- if (error) {
- console.log(error);
- }
- callback();
- });
-};
View
12 lib/templates/dust/simple.html
@@ -1,12 +0,0 @@
-<h1>{header}</h1>
-{#items}
-<ul>
- {#current}
- <li><strong>{name}</strong></li>
- {:else}
- <li><a href="{url}">{name}</a></li>
- {/current}
-</ul>
-{:else}
-<p>The list is empty.</p>
-{/items}
View
1 package.json
@@ -12,7 +12,6 @@
"nodelint": "0.5.2",
"underscore": ">=1.1.7",
"coffeekup": "0.3.0",
- "dust": "0.3.0",
"ejs": "0.4.2",
"hamljs": "0.5.1",
"haml": "0.4.2",

0 comments on commit ec1cc24

Please sign in to comment.