SHARE
TWEET

Untitled

a guest May 19th, 2017 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fs = require('fs')
  2.   , sys = require('sys')
  3.   , haml = require('./haml')
  4.  
  5. // Render Haml template
  6. function render(filename, variables) {
  7.   var output = ''
  8.   variables = variables || {};
  9.  
  10.   fs.readFile(filename, function (err, data) {
  11.     if (err) throw err;
  12.     output = haml.render(data, variables);
  13.   });
  14.  
  15.   return output;
  16. }
  17.  
  18. exports.render = render;
RAW Paste Data
Top