-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.js
61 lines (61 loc) · 1.7 KB
/
build.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
61
({
appDir: '.',
baseUrl: '.',
dir: './build',
skipDirOptimize: false, //TODO: change to false if you have a pretty comprehensive build modules defined in this file, and want to speed up the build - only files recuirsively referenced in build modules will be optimized
generateSourceMaps: false, //TODO: change to true if you need source maps generated for easier debugging in production
mainConfigFile: 'common.js',
optimize: 'uglify2',
optimizeCss: 'standard',
pragmasOnSave: {
excludeRequireCss: false //TODO: if dynamic CSS loading in production will not happen (e.g. load from a CDN), change this to true
},
modules: [
{
name: 'common',
include: [
'app/shared/root-bindings',
'framework/router',
'framework/page',
'text',
'css',
'jsface'
/* TODO: add other common modules */
]
},
{
name: 'app/error/error',
exclude: ['common']
},
{
name: 'app/files/files',
exclude: ['common']
},
{
name: 'app/files/dependencies/dependencies',
exclude: ['common']
},
{
name: 'app/home/home',
exclude: ['common']
},
{
name: 'app/resources/resources',
exclude: ['common']
},
{
name: 'component/file-display/file-display',
exclude: ['common']
},
{
name: 'component/page-source-display/page-source-display',
exclude: ['common']
}
/* TODO: add other page modules and component modules */
],
paths: {
materialize: 'empty:'
/* TODO: add any modules you don't want r.js to optimize here with path set to 'empty:',
mainly for third party modules that would fail r.js optimization */
}
})