How to use the compile function from swig
Find comprehensive JavaScript swig.compile code examples handpicked from public code repositorys.
GitHub: byjpr/boojum
38 39 40 41 42 43 44 45 46 47 48
filename: data.path, }); } swigRenderer.compile = function(data, locals) { return swig.compile(data.text, { filename: data.path, }); };
3
3
0
+ 3 other calls in file
3804 3805 3806 3807 3808 3809 3810 3811 3812 3813
/** * Compile string source into a renderable template function. * * @example * var tpl = swig.compile('{{ tacos }}'); * // => { * // [Function: compiled] * // parent: null, * // tokens: [{ compile: [Function] }],
0
1
0
82 83 84 85 86 87 88 89 90 91
}; extend(true, data, tplVars); try { var tpl = swig.compile(String(file.contents), {filename: file.path}); var compiled = tpl(data); file.contents = new Buffer(compiled); callback(null, file);
0
0
0
swig.compileFile is the most popular function in swig (1638 examples)