How to use the consolidate.lodash 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 ustwo / ustwo.com-frontend / src / server / index.sandbox.js View on Github external
import cons from 'consolidate';
import express from 'express';
import http from 'http';
import path from 'path';
import camelCase from 'lodash/string/camelCase';
import capitalize from 'lodash/string/capitalize';

import manifest from '../../package.json';
import sandboxRoutes from 'server/routes.sandbox.js';

let app = express();

app.set('port', 8889);
app.set('host', process.env.VIRTUAL_HOST || ('http://localhost:' + app.get('port') + '/'));
app.set('x-powered-by', false);
app.engine('html', cons.lodash);
app.set('view engine', 'html');
app.set('views', path.join(__dirname, './'));

app.use('/sandbox', sandboxRoutes);

http.createServer(app).listen(app.get('port'));
console.log(`${capitalize(camelCase(manifest.name))} up and running on ${app.get('port')}`);
github ustwo / ustwo.com-frontend / src / server / index.js View on Github external
import cons from 'consolidate';
import express from 'express';
import http from 'http';
import path from 'path';
import camelCase from 'lodash/string/camelCase';
import capitalize from 'lodash/string/capitalize';

import manifest from '../../package.json';
import routes from 'server/routes.js';

let app = express();

app.set('port', 8888);
app.set('host', process.env.VIRTUAL_HOST || ('http://localhost:' + app.get('port') + '/'));
app.set('x-powered-by', false);
app.engine('html', cons.lodash);
app.set('view engine', 'html');
app.set('views', path.join(__dirname, './'));

app.use('/', routes);

http.createServer(app).listen(app.get('port'));
console.log(`${capitalize(camelCase(manifest.name))} up and running on ${app.get('port')}`);
github Hiswe / gulp-svg-symbols / lib / render-templates.js View on Github external
var renderTemplate = function (template, svgData, callback) {
  var name = path.basename(template);
  var svgContent = tmpl(template, {icons: svgData}, function (err, result) {
    if (err) { return callback(err, result); }
    var file =  new File({
      cwd:  './',
      base: './',
      path: name,
      contents: new Buffer(result)
    });
    callback(null, file);
  });
};
github Hiswe / gulp-svg-symbols / lib / svg-data-to-svg-file.js View on Github external
module.exports = function(buffer, callback) {
  var svgContent = _tmpl(svgTplFile, {icons: buffer}, function (err, result) {
    if (err) return callback(err, result);
    var file =  new File({
      cwd:  './',
      base: './',
      path: 'svg-symbols.svg',
      contents: new Buffer(result)
    });
    callback(null, file);
  });
};
github Hiswe / gulp-svg-symbols / lib / svg-data-to-css-file.js View on Github external
module.exports = function(buffer, callback) {
  var svgContent = _tmpl(cssTplFile, {icons: buffer}, function (err, result) {
    if (err) return callback(err, result);
    var file =  new File({
      cwd:  './',
      base: './',
      path: 'svg-symbols.css',
      contents: new Buffer(result)
    });
    callback(null, file);
  });
};

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 8 months ago

Package Health Score

79 / 100
Full package analysis