How to use the jade.render function in jade

To help you get started, we’ve selected a few jade examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github popeindustries / buddy / packages / buddy-plugin-jade / index.js View on Github external
exports.compile = function (content, options, fn) {
  // Copy data to root
  options = Object.assign({}, options, DEFAULT_OPTIONS, options.data);

  jade.render(content, options, (err, content) => {
    if (err) {
      err.filepath = options.filepath;
      return fn(err);
    }
    fn(null, content);
  });
};
github Teal / TealUI / tools / node / node_modules2 / utilskit / parsers.js View on Github external
parseEjs: function(content, options, callback) {
		var ejs = require('ejs');
		content = ejs.render(content.toString(), options);
		callback(content);
	},
github ng-tools / ng-factory / lib / transforms / jade.js View on Github external
module.exports = through('jade', function(file, config) {
  if(config.strict && path.extname(file.path) !== '.jade') return;
  var result = jade.render(String(file.contents), extend(config, config.locals));
  file.contents = new Buffer(result);
  if(config.rename) {
    file.path = gutil.replaceExtension(file.path, '.html');
  }
}, defaults);
github segment-boneyard / component-jade / index.js View on Github external
function html (file, opts) {
  file.filename = basename(file.filename) + '.html';
  file.contents = jade.render(file.contents, opts);
  return file;
}

jade

A clean, whitespace-sensitive template language for writing HTML

MIT
Latest version published 9 years ago

Package Health Score

58 / 100
Full package analysis