26 lines
701 B
Makefile
26 lines
701 B
Makefile
.PHONY: default update update-inter node-modules format
|
|
|
|
default: node-modules
|
|
|
|
update: update-inter format
|
|
|
|
update-inter:
|
|
@tmp_zip=$$(mktemp) && \
|
|
tmp_dir=$$(mktemp -d) && \
|
|
curl -s https://api.github.com/repos/rsms/inter/releases/latest \
|
|
| jq -r '.assets[] | select(.name | test("\\.zip$$")) | .browser_download_url' \
|
|
| xargs curl -Ls -o $$tmp_zip && \
|
|
unzip -q -o $$tmp_zip "web/*" -d $$tmp_dir && \
|
|
rm -rf static/font/inter && \
|
|
mkdir -p static/font/inter && \
|
|
cp -r $$tmp_dir/web/{InterVariable*.woff2,Inter-*.woff2} static/font/inter && \
|
|
rm -rf $$tmp_zip $$tmp_dir
|
|
|
|
node-modules:
|
|
npm install && \
|
|
cd ../.. && \
|
|
ln -s ./themes/caldwell/node_modules node_modules
|
|
|
|
format:
|
|
nix fmt
|