Skip to content

Commit a7ad796

Browse files
committed
generate wled00/html_*.h files
1 parent 22d0675 commit a7ad796

File tree

9 files changed

+17
-7810
lines changed

9 files changed

+17
-7810
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ wled-update.sh
2222
/wled00/my_config.h
2323
/wled00/Release
2424
/wled00/wled00.ino.cpp
25+
/wled00/html_*.h

pio-scripts/build-html.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Import('env')
2+
import glob
3+
import os
4+
5+
if not os.path.isdir('node_modules'):
6+
env.Execute("npm ci")
7+
8+
if not os.path.exists('wled00/html_ui.h'):
9+
env.Execute("npm run build")
10+
11+
latest_source = max(glob.glob('wled00/data/*.htm'), key=os.path.getmtime)
12+
latest_export = max(glob.glob('wled00/html_*.h'), key=os.path.getmtime)
13+
14+
if os.path.getmtime(latest_source) > os.path.getmtime(latest_export):
15+
env.Execute("npm run build")

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ ldscript_16m14m = eagle.flash.16m14m.ld
209209
[scripts_defaults]
210210
extra_scripts =
211211
pre:pio-scripts/set_version.py
212+
pre:pio-scripts/build-html.py
212213
post:pio-scripts/output_bins.py
213214
post:pio-scripts/strip-floats.py
214215
pre:pio-scripts/user_config_copy.py

wled00/html_cpal.h

Lines changed: 0 additions & 323 deletions
This file was deleted.

wled00/html_other.h

Lines changed: 0 additions & 1181 deletions
This file was deleted.

wled00/html_pixart.h

Lines changed: 0 additions & 535 deletions
This file was deleted.

wled00/html_settings.h

Lines changed: 0 additions & 2225 deletions
This file was deleted.

wled00/html_simple.h

Lines changed: 0 additions & 1151 deletions
This file was deleted.

wled00/html_ui.h

Lines changed: 0 additions & 2395 deletions
This file was deleted.

0 commit comments

Comments
 (0)