code: function renderJade(viewFiles, viewModel, callback) {
    var jadeFile = viewFiles[0];
  
    if (viewFiles.length > 1) {
      console.warn('TEMPLATES: More than one possible Jade view file found, will take main or index.');
      jadeFile = _.find(viewFiles, function (file) {
        return Path.basename(file, Path.extname(file)) === 'main' || Path.basename(file, Path.extname(file)) === 'index';
      });
    }
  
    if (jadeFile) {
      // Handle exports.
      viewModel.basedir = Path.join(__dirname, '../templates/jade/');
      
      Consolidate.jade(jadeFile, viewModel, function (err, html) {
        if (!err) {
          callback && callback(html);
        }
        else {
          console.error('TEMPLATES: Error generating view from Jade file ' + jadeFile, err);
          callback && callback();
        }
      });
    }
    else {
      console.warn('TEMPLATES: Could not find appropriate main Jade view file, please rename your main template to main.jade or index.jade.');
      callback && callback();
    }
  }
docs: Private
  
  @ignore