2023-01-02 16:44:22 -06:00
|
|
|
ifndef dev
|
|
|
|
|
sass_opts = --no-source-map --style=compressed
|
2023-01-03 14:47:27 -06:00
|
|
|
else
|
|
|
|
|
compile_opts = dev
|
2023-01-02 16:44:22 -06:00
|
|
|
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*
|
|
|
|
|
|
2023-03-06 22:01:50 -06:00
|
|
|
.PHONY: serve
|
|
|
|
|
serve: all
|
|
|
|
|
php -S 0.0.0.0:7654 -t build
|
|
|
|
|
|
2022-12-25 13:07:25 -06:00
|
|
|
build/index.html: index.html config.toml compile.js
|
2023-01-03 14:47:27 -06:00
|
|
|
node compile.js $(compile_opts)
|
2022-12-21 15:57:06 -06:00
|
|
|
|
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
|
2023-01-01 23:25:44 -06:00
|
|
|
git rev-parse --short @ > build/.version
|
2023-01-01 20:39:14 -06:00
|
|
|
rsync -av --exclude=.gitignore --exclude='*.~undo-tree~' build/ ../links-pages
|