noloop / cl-minify-css

To minify css with common lisp.
10 stars 1 forks source link

Minify using threads for big css files #3

Open noloop opened 4 years ago

noloop commented 4 years ago

I think:

1 - What you need is think in data, so split all the CSS string in:

(("classe-names-1" (("k1" "v1") ("k2" "v2")))
 ("classe-names-2" (("k1" "v1")))
 (:media ("classe-names-1" (("k1" "v1")))
         ("classe-names-2" (("k1" "v1")))))

;; to do this: (defun css-to-cl-list (css) ...)

2 - Create rules functions to treat the minification of the css using the list above, when requested more of one thread so divide the list returned by css-to-cl-list in for the threads, and after put it all minified strings together, also allowing put they in file separated.