Skip to content

Commit

Permalink
Added support for Plates
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Worthen committed Jan 24, 2013
1 parent a09a078 commit f416c41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,3 +654,24 @@ exports.toffee.render = function(str, options, fn) {
fn(err);
}
}

/**
* Plates Support.
*/

exports.plates = fromStringRenderer('plates');

/**
* Plates string support.
*/

exports.plates.render = function(str, options, fn) {
var engine = requires.plates || (requires.plates = require('plates'))
, map = options.map || undefined;
try {
var tmpl = cache(options) || cache(options, engine.bind(str, options, map));
fn(null, tmpl);
} catch (err) {
fn(err);
}
}
1 change: 1 addition & 0 deletions test/fixtures/plates/user.plates
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div id="user"><p id="name"></p></div>

0 comments on commit f416c41

Please sign in to comment.