question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compress all files in the directory

See original GitHub issue

I have a case where i would just like to apply cleancss to every file in the directory, without name changing etc.

Ideally this would work:

cleancss path/to/css/*.min.css

I know i can dance around i with xargs and thats what I’m going to do ATM, but i suppose it can be a pretty common use case so i decided to create an issue to hear what you think about it.

Thanks for the great tool 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:23

github_iconTop GitHub Comments

5reactions
mtsknncommented, Mar 12, 2018

I had a similar problem and found this issue, so +1 from me.

As a quick workaround I just installed foreach-cli package so I can do this:

foreach -g "./dist/css/*.css" -x "cleancss -O2 #{path} -o #{path}" --no-c

I’m on Windows so I had to use the --no-c param, otherwise I’d get an error.

3reactions
jakubpawlowiczcommented, Jan 29, 2021

Since clean-css v5.0.0 is out and there’s a new batch option there https://github.com/jakubpawlowicz/clean-css/commit/d8380fe6d1536ca46e898347dc46308cb64aeb7d, I’ll take on this feature next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compress Folder Online (No limits!) - ezyZip
1. Click "Select folder to compress" to bring up the folder chooser 2. (Optional) Set the desired compression level by clicking the down...
Read more >
How do I Compress a Whole Linux or UNIX Directory?
Explains how to use tar command to compress a whole directory (recurse into directories) under Linux or UNIX operating system.
Read more >
Zip and unzip files
To zip (compress) a file or folder · Locate the file or folder that you want to zip. · Press and hold (or...
Read more >
linux - Compress every file in a directory into its own ...
Putting every file into a separate tar file doesn't make any sense in this scenario. You can use gzip to compress them directly:...
Read more >
command line - Zip all files in directory?
Is there a way to zip all files in a given directory with the zip command? I've heard of using *.* , but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found