-
Notifications
You must be signed in to change notification settings - Fork 1
/
openeddi-vulcanize.js
39 lines (27 loc) · 992 Bytes
/
openeddi-vulcanize.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
/**
* Created by jfagan on 10/24/16.
* openeddi-vulcanize.js
*
* Vulcanize the app so that all the HTML imports are embedded in a single file. This should dramatically improve loading
* time, especially for poly-filled browsers (Firefox, IE, etc.)
*
*/
var path = require('path');
global.appRoot = path.resolve(__dirname);
var _ = require('lodash'); // For some functional programming
var fs = require('fs'); // For using the file system.
var log = require('util').log; // For better logging (with timestamps)
var inspect = require('util').inspect;
var async = require('async');
var ejs = require('ejs');
var Vulcanize = require('vulcanize');
// Load the Eddi modules
global.oeModules = null;
var loadEddiModules = function (callback) {
log('[startup] Loading eddi modules');
require('./oe/oe_server/load-oe-module-information')(function (d) {
oeModules = d;
callback(null);
});
};
loadEddiModules();