12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- PY?=python3
- SERVERMODULE=http.server
- ifeq ($(PY), tauthon)
- SERVERMODULE = SimpleHTTPServer
- else ifeq ($(PY), python2)
- SERVERMODULE = SimpleHTTPServer
- else ifeq ($(PY), python3)
- SERVERMODULE = http.server
- endif
- help:
- @echo 'Makefile for generate styles, fonts, icons, js to cl-theme '
- @echo ' '
- @echo 'Usage: '
- @echo ' make all compile all frontend '
- @echo ' make clean delete all fonts, icons, styles, js '
- @echo ' make bulma compile bulma styles '
- @echo ' make icons compile icons '
- @echo ' make styles compile custom styles '
- @echo ' make playlist compile playlist javascript '
- @echo ' make aplaylist compile playlist styles '
- @echo ' make fonts generate fonts '
- @echo ' make js compile javascript files '
- @echo ' make serve [PY=python] [PORT=8000] serve site at http://localhost:8000 '
- @echo ' '
- all: generate
- generate: clean bulma fonts icons js styles playlist aplaylist
- clean:
- @rm -rf dist/
- bulma:
- @bash scripts/bulma.sh
- icons:
- @bash scripts/icons.sh
- styles:
- @bash scripts/styles.sh
- playlist:
- @bash scripts/playlist.sh
- aplaylist:
- @bash scripts/aplaylist.sh
- fonts:
- @bash scripts/fonts.sh
- js:
- @bash scripts/js.sh
- serve: generate
- ifdef PORT
- $(PY) -m $(SERVERMODULE) $(PORT)
- else
- $(PY) -m $(SERVERMODULE)
- endif
|