mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
build_webUI command does it all
This commit is contained in:
@@ -74,9 +74,7 @@ def buildWeb():
|
|||||||
# Run pnpm commands in the interface directory
|
# Run pnpm commands in the interface directory
|
||||||
commands = [
|
commands = [
|
||||||
f"{pnpm_exe} install",
|
f"{pnpm_exe} install",
|
||||||
f"{pnpm_exe} typesafe-i18n",
|
f"{pnpm_exe} build_webUI"
|
||||||
f"{pnpm_exe} build",
|
|
||||||
f"{pnpm_exe} webUI"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for command in commands:
|
for command in commands:
|
||||||
@@ -93,7 +91,8 @@ def buildWeb():
|
|||||||
w.write(text)
|
w.write(text)
|
||||||
print("Setting WebUI locale to 'en'")
|
print("Setting WebUI locale to 'en'")
|
||||||
else:
|
else:
|
||||||
print(f"Warning: {i18n_file} not found, skipping locale modification")
|
print(
|
||||||
|
f"Warning: {i18n_file} not found, skipping locale modification")
|
||||||
|
|
||||||
print("Web interface build completed successfully!")
|
print("Web interface build completed successfully!")
|
||||||
return True
|
return True
|
||||||
@@ -110,6 +109,7 @@ def build_webUI(*args, **kwargs):
|
|||||||
env.Exit(1)
|
env.Exit(1)
|
||||||
env.Exit(0)
|
env.Exit(0)
|
||||||
|
|
||||||
|
|
||||||
# Create custom target that only runs the script and then exits, without continuing with the pio workflow
|
# Create custom target that only runs the script and then exits, without continuing with the pio workflow
|
||||||
env.AddCustomTarget(
|
env.AddCustomTarget(
|
||||||
name="build",
|
name="build",
|
||||||
@@ -119,4 +119,3 @@ env.AddCustomTarget(
|
|||||||
description="installs pnpm packages, updates libraries and builds web UI",
|
description="installs pnpm packages, updates libraries and builds web UI",
|
||||||
always_build=True
|
always_build=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ pnpm format
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
cd interface
|
cd interface
|
||||||
pnpm webUI
|
pnpm build_webUI
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
npx cspell "**"
|
npx cspell "**"
|
||||||
|
|||||||
Reference in New Issue
Block a user