CSS Packer (CSS Uglify) in go (golang)
Example
$ css-pack -i my_css_file.css -o my_css_file.min.css
Will pack and remove comments from the CSS file.
Option | Description |
---|---|
-i <file.css> | Input file. |
-o <file.min.css> | Packed output file. |
-d <file.out> | Dependencies in the CSS file. These are url() and @import . |
-D | Debug flag |
$ git clone https://github.com/pschlump/css-pack.git
$ cd css-pack
$ go get
$ go build
$ ./css-pack -i test2.css -o test2.min.css
$ diff test2.ref.css test2.min.css
And a quick test
$ ./css-pack -i test2.css -o test2.min.css
$ diff test2.ref.css test2.min.css
- It has the start for a
-s
source map - that code is still in progress. - Add in ability to include .css dependencies that are imported into a single file.
- Make it faster. This is mostly replace the existing CSS scanner with a faster one - lexie.