-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (28 loc) · 1002 Bytes
/
Makefile
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
31
32
33
34
35
36
37
38
include .devcontainer/tools.mk
ABLOG_ARGS=
BUILDDIR=_build/html
PORT=8000
default: html
node_modules/.installed: package.json package-lock.json $(NPM)
$(NPM) ci
touch $@
.PHONY: tailwind
tailwind: node_modules/.installed
# Rebuild everything if any JavaScript is modified
$(BUILDDIR)/_static/js/theme.js: _static/js/theme.js
$(eval ABLOG_ARGS=-a)
# Run tailwind if any styles are changed.
_static/css/styles.css: styles.css tailwind.config.js $(wildcard _templates/*.html) _static/js/theme.js tailwind
$(NPX) tailwindcss -i styles.css -o _static/css/styles.css
$(eval ABLOG_ARGS=-a)
html: _static/css/styles.css $(BUILDDIR)/_static/js/theme.js
$(HATCH) run 'blog:build'
mkdir -p $(BUILDDIR)/talks/
cp -r talks/introducing-esbonio $(BUILDDIR)/talks/introducing-esbonio
patch -N -p1 < searchtools.patch
.PHONY: dotfiles
dotfiles:
$(HATCH) -e blog run sphinx-build -M sources . _build
rm -r _build/sources/_sphinx_design_static/
preview:
python -m http.server -d $(BUILDDIR) $(PORT)