How to use the requires function from consolidate

Find comprehensive JavaScript consolidate.requires code examples handpicked from public code repositorys.

15
16
17
18
19
20
21
22
23
app.enable('trust proxy');
app.set('url', config.url || 'http://localhost:3000');
app.set('root_path', '/');

// view engine setup
app.set('handlebars', consolidate.requires.handlebars);
app.engine('hbs', consolidate.handlebars);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'hbs');
fork icon7
star icon52
watch icon5

+ 3 other calls in file

65
66
67
68
69
70
71
72
73
74
);

app.use(session(app));

const viewsPath = path.join(process.cwd(), 'build/app');
cons.requires.nunjucks = nunjucks.configure(viewsPath, {
  autoescape: true,
  noCache: DEV_MODE,
  tags: {
    variableStart: '{=',
fork icon1
star icon11
watch icon2

+ 5 other calls in file

55
56
57
58
59
60
61
62
63
64
//    // fileContentHandler: function(file, source) {
//    //      return translateHtml(source, file, api.config.get('locales[0]'));
//    // }
// });

// engines.requires.swig = swig;
app.engine('html', engines.lodash);
// app.set('view cache', false);
// app.engine('jade', engines.jade);
app.set('trust proxy', true);
fork icon0
star icon6
watch icon2

+ 13 other calls in file