diff options
author | Volpeon <git@volpeon.ink> | 2021-05-10 19:25:21 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-05-10 19:25:21 +0200 |
commit | c33a856773fcffb875ae2ef687398b6423d75c43 (patch) | |
tree | 9590a78eb30e428aebdb2176a3c32640205558af /Makefile | |
parent | Fix deploy (diff) | |
download | volpeon.ink-c33a856773fcffb875ae2ef687398b6423d75c43.tar.gz volpeon.ink-c33a856773fcffb875ae2ef687398b6423d75c43.tar.bz2 volpeon.ink-c33a856773fcffb875ae2ef687398b6423d75c43.zip |
Makefile: Added watch and dev (= watch + serve) targets, added .PHONY
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -100,9 +100,6 @@ out/%.css: assets/css/%.scss $(CSS_SRC) | out | |||
100 | .cache/meta: .cache | 100 | .cache/meta: .cache |
101 | mkdir -p .cache/meta | 101 | mkdir -p .cache/meta |
102 | 102 | ||
103 | .cache/pages: .cache | ||
104 | mkdir -p .cache/pages | ||
105 | |||
106 | .cache: | 103 | .cache: |
107 | mkdir -p .cache | 104 | mkdir -p .cache |
108 | 105 | ||
@@ -113,15 +110,25 @@ out: | |||
113 | # UTILITIES | 110 | # UTILITIES |
114 | # | 111 | # |
115 | 112 | ||
116 | compress: all | 113 | watch: all |
117 | pigz -R -k -9 -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` | 114 | while true; do \ |
118 | brotli -k -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` | 115 | inotifywait -qr -e modify -e create -e delete -e move assets content filters metadata scripts templates; \ |
116 | $(MAKE); \ | ||
117 | done | ||
119 | 118 | ||
120 | serve: all | 119 | serve: all |
121 | python -m http.server --directory out 8000 | 120 | python -m http.server --directory out 8000 |
122 | 121 | ||
122 | dev: watch serve | ||
123 | |||
124 | compress: all | ||
125 | pigz -R -k -9 -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` | ||
126 | brotli -k -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` | ||
127 | |||
123 | deploy: compress | 128 | deploy: compress |
124 | rsync --progress --stats -rvz --delete out/ "$(DEPLOY_TARGET)" | 129 | rsync --progress --stats -rvz --delete out/ "$(DEPLOY_TARGET)" |
125 | 130 | ||
126 | clean: | 131 | clean: |
127 | rm -rf out | 132 | rm -rf out |
133 | |||
134 | .PHONY: all watch serve dev deploy clean | ||