Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: tj/consolidate.js
base: dbfdd2afcd
...
head fork: tj/consolidate.js
compare: edbee054fa
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
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
20 lib/consolidate.js
@@ -542,4 +542,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
3  package.json
@@ -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
3  test/consolidate.js
@@ -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');

No commit comments for this range

Something went wrong with that request. Please try again.