Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit f22551b

Browse files
committed
temporarily restore mustache-only pattern rendering
1 parent 6a6db63 commit f22551b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

builder/pattern_assembler.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
2-
* patternlab-node - v0.13.0 - 2015
3-
*
1+
/*
2+
* patternlab-node - v0.13.0 - 2015
3+
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.
66
*
@@ -68,12 +68,19 @@
6868
}
6969
}
7070

71+
// template: a string containing the template text, not an oPattern
7172
function renderPattern(template, data, partials) {
72-
debugger;
7373
// TODO:
7474
// choose an appropriate pattern engine
7575
// call and return result of its renderPattern method
7676
// OR MAYBE: this should just be a method of oPattern
77+
78+
var mustache = require('mustache');
79+
if (partials) {
80+
return mustache.render(template, data, partials);
81+
} else {
82+
return mustache.render(template, data);
83+
}
7784
}
7885

7986
function isPatternFile(filename, patternlab) {

0 commit comments

Comments
 (0)