Created
January 9, 2024 18:39
-
-
Save etsystoyan/a0b077e895764ef2831386482e6337a2 to your computer and use it in GitHub Desktop.
CSS minifier comparisson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input_directory="inraw" | |
output_directory="optcat" | |
for input_file in "$input_directory"/*; do | |
# Extract the file name without the directory path | |
file_name=$(basename "$input_file") | |
# Define the output file path | |
output_file="$output_directory/${file_name}" | |
# Execute csso command for each file | |
cat "$input_file" > "$output_file" | |
# csso "$input_file" -o "$output_file" | |
# css-purge -i "$input_file" -o "$output_file" | |
done | |
# csso 3.76s 3.81s 3.75s | |
# purge 9.57s 9.62s 9.61s | |
# cat 0.02s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment