-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 997 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
PORT ?= 8000
.DEFAULT_GOAL := help
.PHONY: help clean link serve
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
clean: ## Clean all links
rm -f css/font-awesome.min.css
if [ -d node_modules ]; then \
for i in $$(ls node_modules/reveal.js/css); do \
rm -f css/$$i; \
done \
fi
rm -f fonts
rm -f js
rm -f lib
rm -f plugin
node_modules:
npm install
link: node_modules ## Link all required resources
ln -fs ../node_modules/font-awesome/css/font-awesome.min.css css
for i in $$(ls node_modules/reveal.js/css); do \
ln -fs ../node_modules/reveal.js/css/$$i css/$$i; \
done
ln -fs node_modules/font-awesome/fonts .
ln -fs node_modules/reveal.js/js .
ln -fs node_modules/reveal.js/lib .
ln -fs node_modules/reveal.js/plugin .
serve: ## Serve the slides
@echo "Serving slides at http://127.0.0.1:$(PORT)/"
@echo "Quit the server with CONTROL-C."
@python -m http.server $(PORT)