generate wled00/html_*.h files

This commit is contained in:
Will Tatam
2024-02-25 21:21:19 +00:00
parent 22d0675a3b
commit a7ad79678b
9 changed files with 17 additions and 7810 deletions

15
pio-scripts/build-html.py Normal file
View File

@@ -0,0 +1,15 @@
Import('env')
import glob
import os
if not os.path.isdir('node_modules'):
env.Execute("npm ci")
if not os.path.exists('wled00/html_ui.h'):
env.Execute("npm run build")
latest_source = max(glob.glob('wled00/data/*.htm'), key=os.path.getmtime)
latest_export = max(glob.glob('wled00/html_*.h'), key=os.path.getmtime)
if os.path.getmtime(latest_source) > os.path.getmtime(latest_export):
env.Execute("npm run build")