54 lines
1.1 KiB
Makefile
54 lines
1.1 KiB
Makefile
SASS = ./node_modules/.bin/sass
|
|
BS = ./node_modules/.bin/browser-sync
|
|
REVEALJS = node_modules/reveal.js
|
|
PORT = 8080
|
|
SLIDES_FILE = slides.md
|
|
SLIDES_DIR = sources/slides
|
|
THEME_SOURCE = src/scss/bunige.scss
|
|
THEME = static/css/bunige.css
|
|
TEMPLATE = static/templates/template.html
|
|
OUTPUT_FILE = index.html
|
|
|
|
.PHONY: all serve watch clean css html watch-css
|
|
|
|
all: html
|
|
|
|
css: $(THEME)
|
|
|
|
$(THEME): $(THEME_SOURCE)
|
|
$(SASS) --load-path=. $< $@
|
|
|
|
html: $(OUTPUT_FILE)
|
|
|
|
$(OUTPUT_FILE): $(SLIDES_DIR)/$(SLIDES_FILE) $(THEME) $(TEMPLATE)
|
|
pandoc \
|
|
--to=revealjs \
|
|
--standalone \
|
|
--citeproc \
|
|
--template=$(TEMPLATE) \
|
|
--variable revealjs-url=$(REVEALJS) \
|
|
--syntax-highlighting=zenburn \
|
|
--slide-level=2 \
|
|
--css $(THEME) \
|
|
-o $@ \
|
|
$(SLIDES_DIR)/$(SLIDES_FILE)
|
|
|
|
serve:
|
|
$(BS) start \
|
|
--server \
|
|
--port $(PORT) \
|
|
--files "$(OUTPUT_FILE), $(THEME)" \
|
|
--startPath /$(OUTPUT_FILE)
|
|
|
|
watch:
|
|
watchexec -r \
|
|
-w . \
|
|
-i $(OUTPUT_FILE) \
|
|
-- $(MAKE) all
|
|
|
|
watch-css:
|
|
$(SASS) --watch --load-path=. $(THEME_SOURCE):$(THEME)
|
|
|
|
clean:
|
|
rm -f $(OUTPUT_FILE) $(THEME)
|