-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.js
84 lines (60 loc) · 1.74 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
*
*
*
*
*/
// http://clubmate.fi/requirejs-part-2-optimizing-scripts-with-r-js/
// http://www.svlada.com/require-js-optimization-part2/
({
//src: base codice
baseUrl: "./src/js",
// The module name, this uses only a single file,
// there can be multiple different outputs also
name: "main",
//include:["requireLib"],
// The destination file;
out: "./build/js/antani.js",
// If set to true, any files that were combined into a
// build bundle will be removed from the output folder.
removeCombined: true,
// Finds require() dependencies inside a require() or define call. By default
// this value is false, because those resources should be considered dynamic/runtime
// calls. However, for some optimization scenarios, it is desirable to
// include them in the build.
findNestedDependencies: true,
//config
mainConfigFile: "./src/js/common.js",
logLevel: 0,
//closures
wrap: {
start: "(function() {",
end: "}());"
},
shim: {
'tween': { //il modulo(vedi paths)
exports: 'Tween' //static js object
},
'rstats': { //il modulo(vedi paths)
exports: 'rStats'
},
'rstats': { //il modulo(vedi paths)
exports: 'rStats'
},
'detector':{
exports:"Detector"
}
'three': {
exports: 'THREE',
deps:["raf"]
}
},
paths: {
"domready": "lib/require/domReady",
"requireLib" :"lib/require/require.min",
"datgui":"lib/dat.gui.min",
"tween:" "lib/Tween",
'rstats': 'lib/rStats',
'detector': 'lib/Detector',
"raf": "lib/raf"
})