-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
49 lines (45 loc) · 1.08 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
/**
* Created by tomek on 12/10/16.
*/
var compressor = require('node-minify');
var mimficator = 'uglifyjs';
if(process.argv[2] !== 'production') {
mimficator = 'no-compress';
}
console.log(process.argv[2], 'Using ' + mimficator);
new compressor.minify({
type: mimficator,
fileIn: [
'node_modules/d3/build/d3.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/vue/dist/vue.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'assets/js/assorted.js',
'assets/js/MazeBuilder.js',
'assets/js/Renderer.js',
],
fileOut: 'static/build.min.js',
callback: function(err, min) {
if (err) {
console.error(err);
}
//console.log(min);
console.log('Done js');
}
});
new compressor.minify({
type: 'clean-css',
fileIn: [
'node_modules/bootstrap/dist/css/bootstrap.css',
'node_modules/bootstrap/dist/css/bootstrap-theme.css',
'assets/css/main.css',
],
fileOut: 'static/build.min.css',
callback: function(err, min) {
if (err) {
console.error(err);
}
//console.log(min);
console.log('Done css');
}
});