How to use the consolidate.mustache function in consolidate

To help you get started, we’ve selected a few consolidate 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 testem / testem / lib / server / index.js View on Github external
configureExpress(app) {
    app.engine('mustache', Mustache);
    app.set('view options', {layout: false});
    app.set('etag', 'strong');
    app.use((req, res, next) => {
      if (this.ieCompatMode) {
        res.setHeader('X-UA-Compatible', `IE=${this.ieCompatMode}`);
      }
      next();
    });
    app.use(express.static(`${__dirname}/../../public`));
  }
github tmiw / postShuffle / Controller / User.js View on Github external
user.save().then(function() {
                        consolidate.mustache(
                            __dirname + "/../templates/email/reset_password.html",
                            {
                                username: username,
                                new_password: newpw
                            },
                            function(err, html)
                            {
                                if (err)
                                {
                                    user.password = oldpw;
                                    user.save().then(function() {
                                        self.emitFailure(err);
                                    }).error(function(e) {
                                        self.emitFailure(e);
                                    });
                                }
github quocnguyen / uptime / lib / email.js View on Github external
return new Promise((resolve, reject) => {
    cons.mustache(
      path.resolve(__dirname, '../views/emails/', filename),
      data || {}, function(err, html) {
      if (err) { return reject(err); }
      resolve(html);
    });
  });
};

consolidate

Modern and maintained fork of the template engine consolidation library. Maintained and supported by Forward Email <https://forwardemail.net>, the 100% open-source and privacy-focused email service.

MIT
Latest version published 17 days ago

Package Health Score

86 / 100
Full package analysis