File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,28 +31,28 @@ jobs:
3131 # Step 4: Minify and obfuscate JavaScript files
3232 - name : Minify and Obfuscate JavaScript
3333 run : |
34- for file in $(find . -type f -name "*.js"); do
34+ for file in $(find . -type f -name "*.js" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*" ); do
3535 javascript-obfuscator "$file" --output "$file"
3636 done
3737
3838 # Step 5: Minify CSS files
3939 - name : Minify CSS
4040 run : |
41- for file in $(find . -type f -name "*.css"); do
41+ for file in $(find . -type f -name "*.css" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*" ); do
4242 cleancss -o "$file" "$file"
4343 done
4444
4545 # Step 6: Minify HTML files
4646 - name : Minify HTML
4747 run : |
48- for file in $(find . -type f -name "*.html"); do
48+ for file in $(find . -type f -name "*.html" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*" ); do
4949 html-minifier-terser --collapse-whitespace --remove-comments --minify-css true --minify-js true -o "$file" "$file"
5050 done
5151
5252 # Step 7: Copy non-minifiable files (images, videos) directly
5353 - name : Copy Non-Minifiable Files
5454 run : |
55- for file in $(find . -type f ! -name "*.html" ! -name "*.css" ! -name "*.js"); do
55+ for file in $(find . -type f ! -name "*.html" ! -name "*.css" ! -name "*.js" ! -path "./node_modules/*" ! -path "./.vscode/*" ! -path "./.idea/*" ! -path "./bootstrap/*" ); do
5656 mkdir -p "$(dirname $file)"
5757 cp "$file" "$(dirname $file)/"
5858 done
You can’t perform that action at this time.
0 commit comments