Permalink
Browse files

Merge branch 'master' of github.com:visionmedia/consolidate.js

  • Loading branch information...
2 parents 9c724bb + edbee05 commit de307a1979a597337f8f508cbe75284db3007aba @tj committed Oct 13, 2012
Showing with 24 additions and 2 deletions.
  1. +20 −0 lib/consolidate.js
  2. +2 −1 package.json
  3. +2 −1 test/consolidate.js
View
@@ -552,4 +552,24 @@ exports.ect.render = function(str, options, fn){
var ECT = require('ect');
var engine = new ECT({ root: { page: str }});
engine.render('page', options, fn);
+};
+
+/**
+ * mote support.
+ */
+
+exports.mote = fromStringRenderer('mote');
+
+/**
+ * mote string support.
+ */
+
+exports.mote.render = function(str, options, fn){
+ var engine = requires.mote || (requires.mote = require('mote'));
+ try {
+ var tmpl = cache(options) || cache(options, engine.compile(str));
+ fn(null, tmpl(options));
+ } catch (err) {
+ fn(err);
+ }
};
View
@@ -31,7 +31,8 @@
"mustache": "0.4.0",
"dot": "0.2.6",
"just": "0.1.8",
- "ect": "0.2.10"
+ "ect": "0.2.10",
+ "mote": "0.2.0"
},
"main": "index",
"scripts": {
View
@@ -19,4 +19,5 @@ require('./shared').test('walrus');
require('./shared').test('mustache');
require('./shared').test('dot');
require('./shared').test('just');
-require('./shared').test('ect');
+require('./shared').test('ect');
+require('./shared').test('mote');

0 comments on commit de307a1

Please sign in to comment.