-
Notifications
You must be signed in to change notification settings - Fork 555
/
Copy pathviews.js
48 lines (42 loc) · 2 KB
/
views.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* View Engine Configuration
* (sails.config.views)
*
* Server-sent views are a classic and effective way to get your app up
* and running. Views are normally served from controllers. Below, you can
* configure your templating language/framework of choice and configure
* Sails' layout support.
*
* For more information on views and layouts, check out:
* http://sailsjs.org/#!/documentation/concepts/Views
*/
module.exports.views = {
/****************************************************************************
* *
* View engine (aka template language) to use for your app's *server-side* *
* views *
* *
* Sails+Express supports all view engines which implement TJ Holowaychuk's *
* `consolidate.js`, including, but not limited to: *
* *
* ejs, pug, handlebars, mustache underscore, hogan, haml, haml-coffee, *
* dust atpl, eco, ect, jazz, jqtpl, JUST, liquor, QEJS, swig, templayed, *
* toffee, walrus, & whiskers *
* *
* For more options, check out the docs: *
* https://github.com/balderdashy/sails-wiki/blob/0.9/config.views.md#engine *
* *
****************************************************************************/
extension: 'pug',
getRenderFn: function () {
// Import `consolidate`.
var consolidate = require('consolidate');
// Return the rendering function for Pug.
return consolidate.pug;
},
layout: false,
/**
* How many releases are retrieve from the API at a time
*/
pageSize: 50
};