-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminify.js
99 lines (90 loc) · 2.17 KB
/
minify.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/node
const minify = require('@node-minify/core');
const cleanCSS = require('@node-minify/clean-css');
const uglifyES = require('@node-minify/uglify-es');
// Min
minify({
compressor: uglifyES,
input: 'dist/roobie.js',
output: 'dist/roobie.min.js',
callback: function(err, min) {}
})
minify({
compressor: cleanCSS,
input: 'dist/roobie.css',
output: 'dist/roobie.min.css',
callback: function(err, min) {}
})
// Bundle
minify({
compressor: uglifyES,
input: 'dist/roobie.bundle.js',
output: 'dist/roobie.bundle.js',
callback: function(err, min) {}
})
minify({
compressor: cleanCSS,
input: 'dist/roobie.bundle.css',
output: 'dist/roobie.bundle.css',
callback: function(err, min) {}
})
// Animations
minify({
compressor: uglifyES,
input: 'dist/roobie.animations.js',
output: 'dist/roobie.animations.js',
callback: function(err, min) {}
})
minify({
compressor: cleanCSS,
input: 'dist/roobie.animations.css',
output: 'dist/roobie.animations.css',
callback: function(err, min) {}
})
// Animations
minify({
compressor: uglifyES,
input: 'dist/roobie.animations.js',
output: 'dist/roobie.animations.js',
callback: function(err, min) {}
})
minify({
compressor: cleanCSS,
input: 'dist/roobie.animations.css',
output: 'dist/roobie.animations.css',
callback: function(err, min) {}
})
// Components
minify({
compressor: uglifyES,
input: 'dist/roobie.components.js',
output: 'dist/roobie.components.js',
callback: function(err, min) {}
})
minify({
compressor: cleanCSS,
input: 'dist/roobie.components.css',
output: 'dist/roobie.components.css',
callback: function(err, min) {}
})
// Layout
minify({
compressor: cleanCSS,
input: 'dist/roobie.layout.css',
output: 'dist/roobie.layout.css',
callback: function(err, min) {}
})
// Themes
minify({
compressor: cleanCSS,
input: 'dist/roobie.themes.css',
output: 'dist/roobie.themes.css',
callback: function(err, min) {}
})
// Utilties
minify({
compressor: cleanCSS,
input: 'dist/roobie.utilities.css',
output: 'dist/roobie.utilities.css',
callback: function(err, min) {}
})