forked from 2d-inc/Nima-WebGL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (46 loc) · 1.15 KB
/
gulpfile.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
var gulp = require('gulp');
var fs = require('fs');
var uglify = require('uglify-js');
gulp.task('default', function(cb)
{
var files = [
"source/Dispatcher.js",
"source/Graphics.js",
"source/Actor.js",
"source/ActorComponent.js",
"source/ActorEvent.js",
"source/ActorNode.js",
"source/ActorBone.js",
"source/ActorImage.js",
"source/ActorRootBone.js",
"source/ActorIKTarget.js",
"source/Animation.js",
"source/BezierAnimationCurve.js",
"source/BinaryReader.js",
"source/ActorLoader.js"
];
var lib = uglify.minify(files, {
compress: {
screw_ie8: true,
sequences: true,
//properties: true,
dead_code: true,
drop_debugger: true,
comparisons: true,
conditionals: true,
evaluate: true,
booleans: true,
loops: true,
unused: true,
hoist_funs: true,
if_return: true,
join_vars: true,
cascade: true,
//negate_iife: true,
drop_console: true
},
outSourceMap: './build/Nima.min.js.map'
});
fs.writeFileSync('./build/Nima.min.js', lib.code);
cb();
});