How to use the jade.compile 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 ryan-roemer / backbone-testing / vendor / mocha.js View on Github external
function HTMLCov(runner) {
  var jade = require('jade')
    , file = __dirname + '/templates/coverage.jade'
    , str = fs.readFileSync(file, 'utf8')
    , fn = jade.compile(str, { filename: file })
    , self = this;

  JSONCov.call(this, runner, false);

  runner.on('end', function(){
    process.stdout.write(fn({
        cov: self.cov
      , coverageClass: coverageClass
    }));
  });
}
github bitovi / testee / examples / mocha / lib / mocha.js View on Github external
function HTMLCov(runner) {
			var jade = require('jade')
				, file = __dirname + '/templates/coverage.jade'
				, str = fs.readFileSync(file, 'utf8')
				, fn = jade.compile(str, { filename: file })
				, self = this;

			JSONCov.call(this, runner, false);

			runner.on('end', function(){
				process.stdout.write(fn({
					cov: self.cov
					, coverageClass: coverageClass
				}));
			});
		}
github charlesXu86 / Chatbot_CN / Chatbot_Web / AdminLTE / bower_components / mocha / mocha.js View on Github external
function HTMLCov(runner) {
  var jade = require('jade')
    , file = __dirname + '/templates/coverage.jade'
    , str = fs.readFileSync(file, 'utf8')
    , fn = jade.compile(str, { filename: file })
    , self = this;

  JSONCov.call(this, runner, false);

  runner.on('end', function(){
    process.stdout.write(fn({
        cov: self.cov
      , coverageClass: coverageClass
    }));
  });
}
github riquito / valib / web / js / ext / mocha.js View on Github external
function HTMLCov(runner) {
  var jade = require('jade')
    , file = __dirname + '/templates/coverage.jade'
    , str = fs.readFileSync(file, 'utf8')
    , fn = jade.compile(str, { filename: file })
    , self = this;

  JSONCov.call(this, runner, false);

  runner.on('end', function(){
    process.stdout.write(fn({
        cov: self.cov
      , coverageClass: coverageClass
    }));
  });
}
github WayneYe / ScrumPoker / node_modules / mocha / _mocha.js View on Github external
function HTMLCov(runner) {
  var jade = require('jade')
    , file = __dirname + '/templates/coverage.jade'
    , str = fs.readFileSync(file, 'utf8')
    , fn = jade.compile(str, { filename: file })
    , self = this;

  JSONCov.call(this, runner, false);

  runner.on('end', function(){
    process.stdout.write(fn({
        cov: self.cov
      , coverageClass: coverageClass
    }));
  });
}
github baryshev / template-benchmark / jade / jade.js View on Github external
module.exports.prepare = function (data, done) {
	var str = fs.readFileSync(__dirname + '/tpl_escaped.jade', 'utf8');
	tplData = data;
	compiled = jade.compile(str);
	done();
};
github zxcabs / 4fun / nodejs / express / app1 / app.js View on Github external
function loadTemplate(viewpath) {
	var fpath = app.get('views') + viewpath,
		str = fs.readFileSync(fpath, 'utf8');
	
	viewOptions.filename = fpath;
	viewOptions.client = true;
	
	return jade.compile(str, viewOptions).toString();	
}
github zxcabs / 4fun / nodejs / express / app2 / lib / app.js View on Github external
function loadTemplate(viewpath) {
	var fpath = app.get('views') + viewpath,
		str = fs.readFileSync(fpath, 'utf8');
	
	viewOptions.filename = fpath;
	viewOptions.client = true;
	
	return jade.compile(str, viewOptions).toString();	
}

jade

A clean, whitespace-sensitive template language for writing HTML

MIT
Latest version published 10 years ago

Package Health Score

58 / 100
Full package analysis