show logs for debug mode

This commit is contained in:
Elijah 2023-11-02 15:48:43 +00:00
parent 3e535aa42a
commit 72d94cad22

View File

@ -522,12 +522,15 @@ def install_frontend_packages(packages: set[str]):
prefer_offline = (
["--prefer-offline"] if config.npm_prefer_offline and uses_npm else []
)
# show logs for debug mode.
show_logs = config.loglevel >= constants.LogLevel.DEBUG
# Install the base packages.
process = processes.new_process(
[package_manager, "install", "--loglevel", "silly", *prefer_offline],
cwd=constants.Dirs.WEB,
shell=constants.IS_WINDOWS,
show_logs=show_logs
)
processes.show_status("Installing base frontend packages", process)
@ -544,6 +547,7 @@ def install_frontend_packages(packages: set[str]):
],
cwd=constants.Dirs.WEB,
shell=constants.IS_WINDOWS,
show_logs=show_logs
)
processes.show_status("Installing tailwind", process)
@ -552,6 +556,7 @@ def install_frontend_packages(packages: set[str]):
[package_manager, "add", *packages, *prefer_offline],
cwd=constants.Dirs.WEB,
shell=constants.IS_WINDOWS,
show_logs=show_logs
)
processes.show_status(
"Installing frontend packages from config and components", process