/
app.build.js
67 lines (67 loc) · 2.08 KB
/
app.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
62
63
64
65
66
67
/*
* http://requirejs.org/docs/optimization.html
*
* Use NodeJs to execute the r.js optimization script on this build script
* node r.js -o app.build.js
*
* See: https://github.com/jrburke/r.js/blob/master/build/example.build.js for an example build script
*
* If you specify just the name (with no includes/excludes) then all modules are combined into the "main" file.
* You can include/exclude specific modules though if needed (this helps with 'lazy loading' scripts)
*
* You can also set optimize: "none" (or more specific uglifyjs settings) if you need to.
*
* Node: if you set relative paths then do them relative to the baseUrl
*/
({
appDir: '../../../',
baseUrl: 'Assets/Scripts',
dir: '../../../project-build',
/*
* The below 'paths' object is useful for when using plugins/named module paths.
* If you use plugins or named modules in your code then don't forget to specify the same paths again in your build script.
* Otherwise your build script wont be able to find your plugins/named modules and will generate an error when building.
*/
paths: {
async: 'Plugins/async',
jsonp: 'Plugins/jsonp',
jquery: 'Utils/jquery',
morpheus: 'Utils/morpheus',
pubsubz: 'Utils/pubsubz',
sizzle: 'Utils/sizzle',
tpl: 'Plugins/tpl',
when: 'Utils/when'
},
optimize: 'none',
modules: [
{
name: 'main'
/*
include: ['App/people'],
exclude: ['Utils/random']
*/
},
{
name: 'example-async'
},
{
name: 'example-jquery-plugins'
},
{
name: 'example-jsonp'
},
{
name: 'example-lazyload',
exclude: ['Utils/random'] // this means this file wont be included as a module definition in example-lazyload.js (but will still be lazy-loaded)
},
{
name: 'example-library-utilities'
},
{
name: 'example-template'
},
{
name: 'example-useful-modules'
}
]
})