You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -28,7 +35,7 @@ Relevant parts to add to the `build.boot` :
28
35
(comp
29
36
;;(watch)
30
37
(cljs :optimizations :advanced)
31
-
(uglify)
38
+
(uglify) ;; still provides a gain even after the cljs task
32
39
;;(aot)
33
40
;;(pom)
34
41
;;(uber)
@@ -67,7 +74,47 @@ The defaults :
67
74
}
68
75
```
69
76
70
-
Future :
71
77
72
-
- support source maps (UglifyJS supports it already)
73
-
- benchmark output sizes versus the google closure compiler when gzipped on a variety of projects
78
+
# As a library
79
+
80
+
Minifying functions that operate on strings and files are exposed:
81
+
82
+
# Why ?
83
+
84
+
I found out that applying UglifyJS2 on my library compiled with :advanced mode of the google closure compiler did yield a size improvement.
85
+
86
+
87
+
88
+
# Contributing
89
+
90
+
Any contribution is very welcome. See the aims section below or issues.
91
+
92
+
Proposed workflow:
93
+
- find/make a project that created js files and add the boot integration as described above (ie. use the library)
94
+
- clone this repository
95
+
- change the version to version-SNAPSHOT or something like this in both this repository and your project
96
+
- in this repository, run : `boot dev`
97
+
- in your project, run whatever command produces the JS files (note that show -f can be convenient): `boot production show -f build show -f` or `boot dev uglify-js`
98
+
99
+
100
+
# Aims
101
+
102
+
Steps (roughly in that order):
103
+
104
+
-[ ] support source maps (UglifyJS supports it already)
105
+
-[ ] make it faster for big files (maybe use uglify-node)
106
+
-[ ] benchmark output sizes versus the google closure compiler when gzipped on a variety of projects.
107
+
-[ ] minify JS files with different compressors (yui/google-closure/rollup etc.) and see if chaining them yields better results (after gzipping).
108
+
-[ ] minify CSS files as well - http://goalsmashers.github.io/css-minification-benchmark/
109
+
-[ ] minify HTML directories - see https://github.com/kangax/html-minifier
110
+
-[ ] minify JARS with proguard?
111
+
-[ ] at any given step, see if some protocol could be implemented
112
+
113
+
114
+
# Thanks
115
+
116
+
The following libraries were a source of inspiration or code:
0 commit comments