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

Commit fe8cc09

Browse files
committed
Merge remote-tracking branch 'origin/dev' into feature/spawnMeta
2 parents 46dd395 + 765cc5a commit fe8cc09

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/engine_mustache.js

+15
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
var Mustache = require('mustache');
2323
var utilMustache = require('./util_mustache');
2424

25+
// This holds the config from from core. The core has to call
26+
// usePatternLabConfig() at load time for this to be populated, which
27+
// it does, so we're cool, right?
28+
let patternLabConfig = {};
29+
2530
var engine_mustache = {
2631
engine: Mustache,
2732
engineName: 'mustache',
@@ -122,6 +127,16 @@ var engine_mustache = {
122127
foundPatternPartial = foundPatternPartial.split(':')[0];
123128

124129
return foundPatternPartial;
130+
},
131+
132+
/**
133+
* Accept a Pattern Lab config object from the core and put it in
134+
* this module's closure scope so we can configure engine behavior.
135+
*
136+
* @param {object} config - the global config object from core
137+
*/
138+
usePatternLabConfig: function (config) {
139+
patternLabConfig = config;
125140
}
126141
};
127142

0 commit comments

Comments
 (0)