2024-05-24 13:05:42 +00:00
|
|
|
|
|
|
|
MIXINS = $(shell find src/scss -name "_*.scss")
|
|
|
|
SCSS = $(shell find src/scss -name "*.scss" -not -name "_*")
|
|
|
|
CSS = $(patsubst src/scss/%.scss,src/public/css/%.css,$(SCSS))
|
|
|
|
|
2024-09-25 18:42:59 +00:00
|
|
|
.PHONY: all clean css stamp
|
2024-05-24 13:05:42 +00:00
|
|
|
|
2024-09-25 18:42:59 +00:00
|
|
|
all: clean css stamp
|
2024-05-24 13:05:42 +00:00
|
|
|
|
|
|
|
clean:
|
2024-09-25 18:42:59 +00:00
|
|
|
@# clean scss
|
2024-05-24 13:05:42 +00:00
|
|
|
@printf "\033[31m RM \033[0m%s\n" src/public/css
|
|
|
|
@rm -f src/public/css/*.css
|
2024-09-25 18:42:59 +00:00
|
|
|
@git stash -- src/public/css/prism.css > /dev/null
|
|
|
|
|
|
|
|
@# clean stamps
|
|
|
|
@printf "\033[31m RM \033[0m%s\n" src/web/stamp.php
|
|
|
|
@rm -f src/web/stamp.php
|
2024-05-24 13:05:42 +00:00
|
|
|
|
2024-09-25 18:42:59 +00:00
|
|
|
# =============================================== COMPILE SCSS ==
|
|
|
|
|
|
|
|
css: $(CSS)
|
2024-05-24 13:05:42 +00:00
|
|
|
|
|
|
|
$(CSS): src/public/css/%.css : src/scss/%.scss $(MIXINS)
|
|
|
|
@printf "\033[33m SCSS \033[0m%s\n" $<
|
2024-09-24 21:31:29 +00:00
|
|
|
@mkdir -p $(@D)
|
2024-05-24 13:05:42 +00:00
|
|
|
@sassc --style compressed $< $@
|
|
|
|
|
2024-09-25 18:42:59 +00:00
|
|
|
# ============================================ GENERATE STAMPS ==
|
|
|
|
|
|
|
|
stamp:
|
|
|
|
@printf "\033[32m STMP \033[0m%s\n" src/web/stamp.php
|
|
|
|
@./build/stamp.sh
|