Skip to content

Commit

Permalink
fix: individual png jpg rules
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jun 9, 2023
1 parent 77838a5 commit 72770d7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ $(DIST)/%.js: $(SRC)/%.b64

%.webp.compressed: %.webp
convert $< -quality $(QUALITY) -resize $(RESIZE) $@
TOWEBP_TYPES = png jpg
define WEBP_TEMPLATE
%.webp: %.$(1)
convert $$< $$@
endef
$(foreach type,$(TOWEBP_TYPES),$(eval $(call WEBP_TEMPLATE,$(type))))
%.webp: %.png
convert $< $@
%.webp: %.jpg
convert $< $@

%.json.compressed: %.json
cat $< | jq -c > $@
Expand Down

0 comments on commit 72770d7

Please sign in to comment.