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
Copy file name to clipboardExpand all lines: README.md
+19
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ Previously a part of clean-css it's a separate package since clean-css 4.0.
35
35
*[As a module](#as-a-module)
36
36
-[FAQ](#faq)
37
37
*[How to optimize multiple files?](#how-to-optimize-multiple-files)
38
+
*[How to process multiple files without concatenating them into one output file?](#how-to-process-multiple-files-without-concatenating-them-into-one-output-file)
38
39
*[How to specify a custom rounding precision?](#how-to-specify-a-custom-rounding-precision)
39
40
*[How to rebase relative image URLs?](#how-to-rebase-relative-image-urls)
40
41
*[How to apply level 1 & 2 optimizations at the same time?](#how-to-apply-level-1--2-optimizations-at-the-same-time)
@@ -364,6 +365,24 @@ Since version 4.1.0 it can also be done using glob pattern matching, e.g.
364
365
cleancss -o merged.min.css *.css
365
366
```
366
367
368
+
## How to process multiple files without concatenating them into one output file?
369
+
370
+
Since clean-css-cli 5.0 you can optimize files one by one, without joining them into one output file, e.g.
371
+
372
+
```shell
373
+
cleancss --batch styles/*.css
374
+
```
375
+
376
+
By default it will pick up every single file from `styles` directory, optimize it, add a `-min` suffix to filename (before extension), and write it to disk.
377
+
378
+
You can use `--batch-suffix` option to customize the `-min` suffix, e.g.
0 commit comments