Install dependencies in prod mode (#887)

This commit is contained in:
Nikhil Rao 2023-04-26 14:49:11 -07:00 committed by GitHub
parent b9e5ef8e76
commit a165d745f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -126,6 +126,12 @@ def setup_frontend(root: Path):
Args:
root: root path of the project.
"""
# Initialize the web directory if it doesn't exist.
web_dir = prerequisites.create_web_directory(root)
# Install frontend packages
prerequisites.install_frontend_packages(web_dir)
# copy asset files to public folder
path_ops.mkdir(str(root / constants.WEB_ASSETS_DIR))
path_ops.cp(

View File

@ -38,12 +38,6 @@ def run_frontend(app: App, root: Path, port: str):
root: root path of the project.
port: port of the app.
"""
# Initialize the web directory if it doesn't exist.
web_dir = prerequisites.create_web_directory(root)
# Install frontend packages
prerequisites.install_frontend_packages(web_dir)
# Set up the frontend.
setup_frontend(root)