-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix platformio build, add pre-build hook to build the web app
- Loading branch information
1 parent
a6eabbb
commit 86c2c4f
Showing
2 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,16 @@ | |
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[env:EspDmxNode] | ||
[platformio] | ||
default_envs = esp8266-nodemcuv2 | ||
|
||
[common] | ||
lib_deps = | ||
me-no-dev/ESP Async WebServer@^1.2.3 | ||
bblanchon/ArduinoJson@^6.18.5 | ||
marvinroger/AsyncMqttClient@^0.9.0 | ||
|
||
[env:esp8266-nodemcuv2] | ||
platform = [email protected] | ||
framework = arduino | ||
board = nodemcuv2 | ||
|
@@ -17,7 +26,7 @@ build_flags = -D PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48_SECHEAP_SHARED | |
monitor_speed = 115200 | ||
upload_speed = 115200 | ||
lib_deps = | ||
${common.lib_deps} | ||
me-no-dev/ESPAsyncTCP@^1.2.2 | ||
me-no-dev/ESP Async WebServer@^1.2.3 | ||
bblanchon/ArduinoJson@^6.18.5 | ||
marvinroger/AsyncMqttClient@^0.9.0 | ||
Makuna/[email protected] ; ^2.6.5 breaks compatibility | ||
extra_scripts = pre:src/build_web_app.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Import("env") | ||
|
||
def build_web_app(source, target, env): | ||
env.Execute("cd src/web_app && npm run build") | ||
|
||
env.AddPreAction("${BUILD_DIR}/src/EspDmxNode.cpp.o", build_web_app) |