How to use the compileFile function from jade
Find comprehensive JavaScript jade.compileFile code examples handpicked from public code repositorys.
GitHub: zhoutony/html5

57 58 59 60 61 62 63 64 65 66
returnsfunction A function to generate the html from an object containing locals var jade = require('jade'); // Compile a function var fn = jade.compileFile('path to jade file', options); // Render the function var html = fn(locals); // => '<string>of jade</string>'
15 16 17 18 19 20 21 22 23 24
exports.compileClient = function (source, options) { return jade.compileClientWithDependenciesTracked(source, options) } exports.compileFile = function (path, options) { const fn = jade.compileFile(path, options) return { fn, dependencies: fn.dependencies }
jade.compile is the most popular function in jade (34 examples)