Makefile (1705B)
1 minify-css:
2 cat css/purpleish.css | \
3 sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
4 tr -d '\t' | \
5 tr -d '\n' | \
6 tr -s ' ' ' ' | \
7 sed -E \
8 -e 's/\s*;\s*/;/g' \
9 -e 's/\s*:\s*/:/g' \
10 -e 's/\s*\{\s*/{/g' \
11 -e 's/\s*\}\s*/}/g' \
12 -e 's/\s*,\s*/,/g' \
13 -e 's/\s*>\s*/>/g' \
14 -e 's/\s*<\s*/</g' | \
15 tee css/purpleish.min.css > /dev/null
16 cat css/visibility.css | \
17 sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
18 tr -d '\t' | \
19 tr -d '\n' | \
20 tr -s ' ' ' ' | \
21 sed -E \
22 -e 's/\s*;\s*/;/g' \
23 -e 's/\s*:\s*/:/g' \
24 -e 's/\s*\{\s*/{/g' \
25 -e 's/\s*\}\s*/}/g' \
26 -e 's/\s*,\s*/,/g' \
27 -e 's/\s*>\s*/>/g' \
28 -e 's/\s*<\s*/</g' | \
29 tee css/visibility.min.css > /dev/null
30 cat css/mobile.css | \
31 sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
32 tr -d '\t' | \
33 tr -d '\n' | \
34 tr -s ' ' ' ' | \
35 sed -E \
36 -e 's/\s*;\s*/;/g' \
37 -e 's/\s*:\s*/:/g' \
38 -e 's/\s*\{\s*/{/g' \
39 -e 's/\s*\}\s*/}/g' \
40 -e 's/\s*,\s*/,/g' \
41 -e 's/\s*>\s*/>/g' \
42 -e 's/\s*<\s*/</g' | \
43 tee css/mobile.min.css > /dev/null
44
45 apply-css-docker:
46 docker cp ./css/purpleish.min.css ktistec:/app/public/3rd/purpleish.min.css
47 docker cp ./css/visibility.min.css ktistec:/app/public/3rd/visibility.min.css
48 docker cp ./css/mobile.min.css ktistec:/app/public/3rd/mobile.min.css
49 docker cp ./css/icons ktistec:/app/public/3rd/icons
50 docker exec -ti ktistec \
51 sh -c "echo \"@import url('purpleish.min.css');\" > ./tmp && \
52 echo \"@import url('visibility.min.css');\" >> ./tmp && \
53 echo \"@import url('mobile.min.css');\" >> ./tmp && \
54 cat /app/public/3rd/semantic*.css >> ./tmp && \
55 mv ./tmp /app/public/3rd/semantic-*.min.css"
56