How to use the requires function from consolidate
Find comprehensive JavaScript consolidate.requires code examples handpicked from public code repositorys.
GitHub: doowb/octobox.js
![doowb profile picture](/doowb.png?size=40)
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');
+ 3 other calls in file
GitHub: JasonBoy/vue-web-kit
![JasonBoy profile picture](/JasonBoy.png?size=40)
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: '{=',
+ 5 other calls in file
GitHub: liujingbreak/plink
![liujingbreak profile picture](/liujingbreak.png?size=40)
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);
+ 13 other calls in file
consolidate.render is the most popular function in consolidate (164 examples)