Przeglądaj źródła

Install dependencies in prod mode (#887)

Nikhil Rao 2 lat temu
rodzic
commit
a165d745f2
2 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 0
      pynecone/utils/build.py
  2. 0 6
      pynecone/utils/exec.py

+ 6 - 0
pynecone/utils/build.py

@@ -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(

+ 0 - 6
pynecone/utils/exec.py

@@ -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)