-
Notifications
You must be signed in to change notification settings - Fork 8
/
make.js
36 lines (26 loc) · 895 Bytes
/
make.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
var fs = require('fs');
var path = require('path');
module.exports = function (config) {
config.setLanguages(['ru']);
config.includeConfig('enb-bevis-helper');
var bevisHelper = config.module('enb-bevis-helper')
.browserSupport([
'IE >= 9',
'Safari >= 5',
'Chrome >= 33',
'Opera >= 12.16',
'Firefox >= 28'
])
.useAutopolyfiller();
fs.readdirSync('pages').forEach(function(pageName) {
var nodeName = pageName.replace(/(.*?)\-page/, path.join('build', '$1'));
config.node(nodeName, function (nodeConfig) {
bevisHelper
.sourceDeps(pageName)
.forServerPage()
.configureNode(nodeConfig);
nodeConfig.addTech(require('./techs/page'));
nodeConfig.addTarget('?.page.js');
});
});
};