-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.js
54 lines (38 loc) · 1.31 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
var fs = require('fs');
var uglify = require("uglify-js");
var files = [
"public/javascripts/oddsSystem/socket_event.js",
"public/javascripts/oddsSystem/video.js",
"public/javascripts/oddsSystem/video_layer.js",
"public/javascripts/oddsSystem/tableinfo_layer.js",
"public/javascripts/oddsSystem/settings.js",
"public/javascripts/oddsSystem/card_selector.js"
];
var finalCode = uglify.minify( files, {
outSourceMap: "public/javascripts/oddsSystem/ugly.min.js"
});
fs.writeFile("public/javascripts/oddsSystem/ugly.min.js", finalCode.code , function (err) {
console.log(err);
});
// -------------------
var files = [
"public/javascripts/qrCodeReader/video.js",
"public/javascripts/qrCodeReader/client.js"
];
var finalCode = uglify.minify( files, {
outSourceMap: "public/javascripts/qrCodeReader/ugly.min.js"
});
fs.writeFile("public/javascripts/qrCodeReader/ugly.min.js", finalCode.code , function (err) {
console.log(err);
});
// ---------------------
var files = [
"public/javascripts/forDealer/socket_event.js",
"public/javascripts/forDealer/forDealer.js"
];
var finalCode = uglify.minify( files, {
outSourceMap: "public/javascripts/forDealer/ugly.min.js"
});
fs.writeFile("public/javascripts/forDealer/ugly.min.js", finalCode.code , function (err) {
console.log(err);
});