How to use the compileClient function from jade
Find comprehensive JavaScript jade.compileClient code examples handpicked from public code repositorys.
GitHub: zhoutony/html5
74 75 76 77 78 79 80 81 82 83
returnsstring A string of JavaScript representing a function var jade = require('jade'); // Compile a function var fn = jade.compileClient('string of jade', options); // Render the function var html = fn(locals); // => 'function template(locals) { return "<string>of jade</string>"; }'
21
24
7
10 11 12 13 14 15 16 17 18 19
var file = path.join(__dirname, file); var ext = path.extname(file); if ('.jade' != ext) return; var str = fs.readFileSync(file, 'utf8'); var fn = jade.compileClient(str, { compileClient: true, compileDebug: false }); res.push('"'+path.basename(file, '.jade') + '": ' + fn.toString()); }) //console.log(res)
3
1
0
+ 3 other calls in file
15 16 17 18 19 20 21 22 23 24 25 26 27 28
exports.generate = function(file, opts) { var namespace = path.parse(file.path).name; var contents = jade.compileClient( file.contents.toString(), { filename : file.path,
2
1
0
+ 3 other calls in file
jade.compile is the most popular function in jade (34 examples)