|
123456789101112131415161718192021222324252627 |
- #!/bin/sh
-
- project="$HOME/projects/$2"
-
- watch() {
- npx browser-sync start --proxy "$2.test" -w --files $project/resources/views $project/resources/scss &
- pid=$!
- sass --load-path=sass --watch --error-css $project/resources/scss/main.scss $project/public/main.css &
- pid="$pid $!"
- trap "kill -TERM $pid" 0 1 2 15
- wait
- }
-
- once() {
- sass --load-path=sass $project/resources/scss/main.scss $project/public/main.css
- }
-
- deploy() {
- rsync -av --delete onyeka assets view files onyeka@onyeka.ca:~/site/
- }
-
- case $1 in
- 'watch') watch "$2" ;;
- 'transpile') transpile "$2" ;;
- 'deploy') deploy ;;
- 'build') deploy ;; #Should be a function that automatically git pull and builds important applications like stuff in projects/macros, dwm, plugins etc
- esac
|