Solar Array and home energy dashboard.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

48 wiersze
1.4 KiB

  1. .PHONY: all
  2. .SUFFIXES: .jspp .js
  3. PROJNAME=solardash
  4. VIRTUALENV ?= virtualenv-3.7
  5. VRITUALENVARGS =
  6. FILES=$(PROJNAME)/__init__.py
  7. JSFILES = root/js/solardash.file.js root/js/solardash.https.js
  8. THIRDPARTYJS = root/js/jquery.js root/js/highstock.js
  9. root/js/jquery.js:
  10. wget -O $@ "https://code.jquery.com/jquery-3.4.1.min.js"
  11. root/js/highstock.js: Makefile
  12. wget -O - "https://code.highcharts.com/stock/8.0.0/highstock.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false)
  13. root/js/highcharts.js: Makefile
  14. wget -O - "https://code.highcharts.com/stock/8.0.0/highcharts.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false)
  15. # manual deps
  16. root/js/solardash.base.js: $(THIRDPARTYJS)
  17. root/js/solardash.file.js: root/js/solardash.base.js
  18. root/js/solardash.https.js: root/js/solardash.base.js
  19. all: $(JSFILES)
  20. run: $(JSFILES)
  21. .jspp.js:
  22. cpp -Wno-invalid-pp-token -E $< | sed -e '/^#/d' > $@ || (rm "$@"; false)
  23. keepupdate:
  24. find . -name '*.js' -o -name '*.jspp' | entr make all
  25. test:
  26. (ls $(FILES) $(JSFILES) | entr sh -c 'make all && python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i')
  27. test-noentr:
  28. python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i
  29. run: $(JSFILES)
  30. python -m aiohttp.web -H localhost -P 38382 solardash:getapp p/src/raineagle/fixtures/data
  31. env:
  32. ($(VIRTUALENV) $(VIRTUALENVARGS) p && . ./p/bin/activate && pip install -r requirements.txt)