links/Makefile

31 lines
718 B
Makefile
Raw Normal View History

2023-01-02 16:44:22 -06:00
ifndef dev
sass_opts = --no-source-map --style=compressed
endif
2022-12-25 13:07:25 -06:00
.PHONY: all
all: build/index.html build/style.css
2023-01-02 16:44:22 -06:00
.PHONY: clean
clean:
rm -v build/index.html build/style.css*
2022-12-25 13:07:25 -06:00
build/index.html: index.html config.toml compile.js
2022-12-21 15:57:06 -06:00
node compile.js
2022-12-21 21:12:31 -06:00
build/style.css: scss/style.scss node_modules/bootstrap/scss/_root.scss
2023-01-02 16:44:22 -06:00
npx sass $(sass_opts) $< $@
2022-12-21 21:12:31 -06:00
node_modules/bootstrap/scss/_root.scss: package-lock.json
npm ci
package-lock.json: package.json
npm install
2023-01-01 20:39:14 -06:00
.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
2023-01-01 20:39:14 -06:00
rsync -av --exclude=.gitignore --exclude='*.~undo-tree~' build/ ../links-pages