-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.js
60 lines (56 loc) · 1.23 KB
/
config.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
49
50
51
52
53
54
55
56
57
58
59
60
const path = require('path');
const {PARTIAL} = require('zombiebox-extension-dependency-injection').types.ImportType;
const klaw = require('klaw-sync');
const listStatic = (dir) => {
const staticRoot = path.resolve(__dirname, 'static', dir);
const staticFiles = {};
for (const file of klaw(staticRoot, {nodir: true})) {
const absolutePath = file.path;
staticFiles[path.relative(staticRoot, absolutePath)] = absolutePath;
}
return staticFiles;
};
/**
* @return {Object}
*/
module.exports = function() {
return {
project: {
name: 'demo',
entry: path.resolve(__dirname, 'app/application.js'),
src: path.resolve(__dirname, 'app')
},
generatedCode: path.resolve(__dirname, '.generated'),
include: [
{
name: 'Images',
static: listStatic('img')
}
],
devServer: {
backdoor: path.resolve(__dirname, 'app/dev.js')
},
extensions: {
di: {
services: {
scenesNativeInput: {
_import: PARTIAL
},
scenesVideoPlayer: {
_import: PARTIAL
}
},
servicesAutodetect: [
{
group: 'scenes',
directory: path.resolve(__dirname, 'app/scenes')
},
{
group: 'service',
directory: path.resolve(__dirname, 'app/service')
}
]
}
}
};
};