links/Makefile
2023-01-03 14:47:27 -06:00

32 lines
758 B
Makefile

ifndef dev
sass_opts = --no-source-map --style=compressed
else
compile_opts = dev
endif
.PHONY: all
all: build/index.html build/style.css
.PHONY: clean
clean:
rm -v build/index.html build/style.css*
build/index.html: index.html config.toml compile.js
node compile.js $(compile_opts)
build/style.css: scss/style.scss node_modules/bootstrap/scss/_root.scss
npx sass $(sass_opts) $< $@
node_modules/bootstrap/scss/_root.scss: package-lock.json
npm ci
package-lock.json: package.json
npm install
.PHONY: deploy
deploy: ../links-pages/index.html ../links-pages/Makefile
$(MAKE) -C ../links-pages
../links-pages/index.html: all
git rev-parse --short @ > build/.version
rsync -av --exclude=.gitignore --exclude='*.~undo-tree~' build/ ../links-pages