blob: c3b21ff0b83a710cdd1163d2d4d4bba80b0bce4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
FILES_SRC := $(shell find src/icons -type f -name "*.svg")
FILES := $(patsubst src/icons/%.svg,output/%.svg,$(FILES_SRC))
all: files showcase/index.html
files: $(FILES)
###
output/%.svg: src/icons/%.svg | output
scour -i "$<" \
--enable-viewboxing \
--enable-id-stripping \
--enable-comment-stripping \
--remove-descriptive-elements \
--strip-xml-prolog \
--shorten-ids | sed -z 's/\(fill\|stroke\)="#.\{3,6\}"/\1="currentColor"/g;s/stroke-width="[0-9.]*"//g;s/stroke-linecap="[a-z]*"//g;s/stroke-linejoin="[a-z]*"//g;s/style="[ a-z0-9:-]*"//g' > "$@"
showcase/index.html: src/showcase/index.html $(FILES) | showcase
scripts/build_showcase.sh
showcase:
mkdir -p showcase
output:
mkdir -p output
###
.PHONY: all
|