mirror of
https://github.com/spirit-x64/scripts.git
synced 2024-11-23 23:23:11 +03:00
rm unecessary comments
This commit is contained in:
parent
12f7168961
commit
7f604771f1
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Known issues:
|
# Known issues:
|
||||||
# - if html line have two paths only one file considered
|
# - it graps only one file path from each HTML line and removes other paths in the same line
|
||||||
# - fails if js file has backticks
|
# - fails if js file has backticks
|
||||||
|
|
||||||
command -v html-minifier >/dev/null 2>&1 || { echo "Error: to install missing deps run: npm i -g html-minifier uglify-js clean-css-cli svgo" >&2; exit 1; }
|
command -v html-minifier >/dev/null 2>&1 || { echo "Error: to install missing deps run: npm i -g html-minifier uglify-js clean-css-cli svgo" >&2; exit 1; }
|
||||||
@ -36,7 +36,7 @@ if [[ -f "$html_file" ]]; then
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
' "$html_file" > "${html_file}.tmp"
|
' "$html_file" > "${html_file}.tmp"
|
||||||
# Minify and replace content
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $line =~ ´([^\"]+)´ ]]; then
|
if [[ $line =~ ´([^\"]+)´ ]]; then
|
||||||
file="${BASH_REMATCH[1]}"
|
file="${BASH_REMATCH[1]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user