Commit 76b13a6038

76b13a60384cfe88c0837e1b9f0347f0f250753f

parent: 577fbbd501

Unsigned

cmc <hello@cleberg.net> · 2025-03-21 03:25 UTC

minify css before building site

Layout: unified · split

build.sh +13 −13
@@ -9,10 +9,10 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then
99 # Check if the environment flag is set to PROD
1010 if [[ "$ENV" == "prod" ]]; then
1111 echo "Environment: Production"
12
12
1313 # Check if publishing via LAN or remotely
1414 printf "Publishing on remote or LAN? [r|l] "
15
15
1616 # Update ubuntu_server variable based on answer
1717 read method
1818 if [[ "$method" =~ ^[Rr]$ ]]; then
@@ -23,30 +23,30 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then
2323 echo "Invalid input. Assuming LAN (ubuntu)"
2424 ubuntu_server="ubuntu"
2525 fi
26
26
2727 # Remove previous build
2828 rm -rf .build/*
29
30 # Run publishing script
31 emacs --script publish.el &>/dev/null
32
29
3330 # Minify CSS
3431 minify -o theme/static/styles.min.css theme/static/styles.css
35
32
33 # Run publishing script
34 emacs --script publish.el &>/dev/null
35
3636 # Deploy changes
3737 rsync -r --delete-before .build/* $ubuntu_server:/var/www/cmc.pub/
3838 else
3939 echo "Environment: Development"
40
40
4141 # Remove previous build
4242 rm -rf .build/*
43
44 # Run publishing script
45 emacs --script publish.el
46
43
4744 # Minify CSS
4845 minify -o theme/static/styles.min.css theme/static/styles.css
4946
47 # Run publishing script
48 emacs --script publish.el
49
5050 # Launch development web server
5151 cd .build/
5252 python3 -m http.server