xssbook2/Makefile

22 lines
543 B
Makefile

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))
.PHONY: all clean css
all: clean css
clean:
@# clean scss
@printf "\033[31m RM \033[0m%s\n" src/public/css
@rm -fr src/public/css/*
# =============================================== COMPILE SCSS ==
css: $(CSS)
$(CSS): src/public/css/%.css : src/scss/%.scss $(MIXINS)
@printf "\033[33m SCSS \033[0m%s\n" $<
@mkdir -p $(@D)
@sassc --style compressed $< $@