Skip to content

Commit 69a5cee

Browse files
authored
delete js prod command (#6323)
1 parent b88ffca commit 69a5cee

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

packages/reflex-base/src/reflex_base/constants/installer.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,6 @@ class Commands(SimpleNamespace):
107107
DEV = "react-router dev --host"
108108
EXPORT = "react-router build"
109109

110-
@staticmethod
111-
def get_prod_command(frontend_path: str = "") -> str:
112-
"""Get the prod command with the correct 404.html path for the given frontend_path.
113-
114-
Args:
115-
frontend_path: The frontend path prefix (e.g. "/app").
116-
117-
Returns:
118-
The sirv command with the correct --single fallback path.
119-
"""
120-
stripped = frontend_path.strip("/")
121-
fallback = f"{stripped}/404.html" if stripped else "404.html"
122-
return f"sirv ./build/client --single {fallback} --host"
123-
124110
PATH = "package.json"
125111

126112
_react_version = _determine_react_version()

tests/units/test_prerequisites.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pytest
66
from click.testing import CliRunner
77
from reflex_base.config import Config
8-
from reflex_base.constants.installer import PackageJson
98
from reflex_base.utils.decorator import cached_procedure
109

1110
from reflex.reflex import cli
@@ -91,24 +90,6 @@ def test_initialise_vite_config(config, expected_output):
9190
assert expected_output in output
9291

9392

94-
@pytest.mark.parametrize(
95-
("frontend_path", "expected_command"),
96-
[
97-
("", "sirv ./build/client --single 404.html --host"),
98-
("/", "sirv ./build/client --single 404.html --host"),
99-
("/app", "sirv ./build/client --single app/404.html --host"),
100-
("/app/", "sirv ./build/client --single app/404.html --host"),
101-
("app", "sirv ./build/client --single app/404.html --host"),
102-
(
103-
"/deep/nested/path",
104-
"sirv ./build/client --single deep/nested/path/404.html --host",
105-
),
106-
],
107-
)
108-
def test_get_prod_command(frontend_path, expected_command):
109-
assert PackageJson.Commands.get_prod_command(frontend_path) == expected_command
110-
111-
11293
def test_cached_procedure():
11394
call_count = 0
11495

0 commit comments

Comments
 (0)