forked from phcode-dev/phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
require.min.config.js
40 lines (37 loc) · 1.57 KB
/
require.min.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
// this is WIP
// References:
// https://stackoverflow.com/questions/14337970/minifying-requirejs-javascript-codebase-to-a-single-file
// https://github.com/requirejs/r.js
// https://github.com/requirejs/r.js/blob/master/build/example.build.js
// https://requirejs.org/docs/optimization.html
// https://github.com/brackets-cont/brackets/blob/master/Gruntfile.js
({
// `name` and `out` is set by grunt-usemin
baseUrl: 'src',
optimize: 'uglify2',
// brackets.js should not be loaded until after polyfills defined in "utils/Compatibility"
// so explicitly include it in main.js
include: ["utils/Compatibility", "brackets"],
// TODO: Figure out how to make sourcemaps work with grunt-usemin
// https://github.com/yeoman/grunt-usemin/issues/30
generateSourceMaps: true,
useSourceUrl: true,
// required to support SourceMaps
// http://requirejs.org/docs/errors.html#sourcemapcomments
preserveLicenseComments: false,
useStrict: true,
// Disable closure, we want define/require to be globals
wrap: false,
paths: {
"text": "thirdparty/text/text",
"i18n": "thirdparty/i18n/i18n",
// The file system implementation. Change this value to use different
// implementations (e.g. cloud-based storage).
"fileSystemImpl": "filesystem/impls/appshell/AppshellFileSystem",
"preact-compat": "thirdparty/preact-compat/preact-compat.min",
"thirdparty/preact": "thirdparty/preact/preact"
},
uglify2: {}, // https://github.com/mishoo/UglifyJS2
waitSeconds: 60,
out: "src/brackets-min.js"
})