-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.type.js
88 lines (70 loc) · 2.72 KB
/
build.type.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
85
86
87
88
/*
* BUILD DATACAFE DATACAFE DATACAFE DATACAFE DATACAFE DATACAFE DATACAFE
*
* Make sure to have updated the version number, stored in constants
*
*
* ON LOCAL
*
* 1) Duplicate 'meshwriter' into 'meshwriterbuild' using finder
*
* 3) Run r.js
* $ cd meshwriterbuild
* $ node r.js -o build.type.js
*
*/
({
baseUrl: ".",
//By default all the configuration for optimization happens from the command
//line or by properties in the config file, and configuration that was
//passed to requirejs as part of the app's runtime "main" JS file is *not*
//considered. However, if you prefer the "main" JS file configuration
//to be read for the build so that you do not have to duplicate the values
//in a separate configuration, set this property to the location of that
//main JS file. The first requirejs({}), require({}), requirejs.config({}),
//or require.config({}) call found in that file will be used.
//As of 2.1.10, mainConfigFile can be an array of values, with the last
//value's config take precedence over previous values in the array.
mainConfigFile: 'index.js',
//Set paths for modules. If relative paths, set relative to baseUrl above.
//If a special value of "empty:" is used for the path value, then that
//acts like mapping the path to an empty file. It allows the optimizer to
//resolve the dependency to path, but then does not include it in the output.
//Useful to map module names that are to resources on a CDN or other
//http: URL when running in the browser and during an optimization that
//file should be skipped because it has no dependencies.
//e.g. if you wish to include `jquery` and `angularjs` from public CDNs,
//paths: { "jquery": "empty:", "angular": "empty:" }
// paths: {
// "foo.bar": "../scripts/foo/bar",
// "baz": "../another/path/baz"
// },
//Configure CommonJS packages. See http://requirejs.org/docs/api.html#packages
//for more information.
packages: [],
//The directory path to save the output. If not specified, then
//the path will default to be a directory called "build" as a sibling
//to the build file. All relative paths are relative to the build file.
dir: "../typebuilt",
locale: "en-us",
optimize: "uglify",
uglify2: {
mangle: { except: [ ] }
},
findNestedDependencies: false,
removeCombined: false,
modules: [
{
name: "index"
}
],
fileExclusionRegExp: /^\./,
logLevel: 2,
onBuildRead_: function (moduleName, path, contents) {
},
onBuildWrite_: function (moduleName, path, contents) {
},
onModuleBundleComplete_: function (data) {
},
waitSeconds: 45,
})