Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/doc_builder/commands/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ def start_sveltekit_dev(tmp_dir, env, args):
)

# start sveltekit in dev mode
run_cmd = ["npm", "run", "dev"]
if args.listen_all:
run_cmd += ["--", "--host"]

subprocess.run(
["npm", "run", "dev"],
run_cmd,
check=True,
encoding="utf-8",
cwd=working_dir,
Expand Down Expand Up @@ -238,6 +242,7 @@ def preview_command_parser(subparsers=None):
)
parser.add_argument("--language", type=str, help="Language of the documentation to generate", default="en")
parser.add_argument("--version", type=str, help="Version of the documentation to generate", default="main")
parser.add_argument("--listen-all", action="store_true", help="Listen to all interfaces (0.0.0.0)")
parser.add_argument(
"--not_python_module",
action="store_true",
Expand Down