-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.js
More file actions
47 lines (46 loc) · 1.13 KB
/
build.js
File metadata and controls
47 lines (46 loc) · 1.13 KB
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
const minify = require('@node-minify/core');
const ujs = require("@node-minify/uglify-es");
minify({
compressor: ujs,
input: './src/AnimatorJS.js',
output: './build/AnimatorJS.min.js',
options: {
mangle: true,
output: {
ast: true,
ecma: 6,
max_line_len: 1024
},
compress: true,
compress: {
inline: 3,
drop_console: true,
keep_fargs: false
}
},
callback: function (err, min) {
console.log("uglify-es DONE", err);
}
}).catch(e => console.log("ERROR", e));
minify({
compressor: ujs,
input: './src/AnimatorJS.dom.js',
output: './build/AnimatorJS.dom.min.js',
options: {
mangle: true,
output: {
ast: true,
ecma: 6,
max_line_len: 1024
},
compress: true,
compress: {
inline: 3,
drop_console: true
}
},
callback: function (err, min) {
console.log("uglify-es DONE", err);
}
}).catch(e => console.log("ERROR", e));
//// TODO: potential adition like AnimatorJS.dom