Connect the native Beta to the project Web workspace

This commit is contained in:
gloamxun committed 2026-11-29 13:36:48 +08:00
1 parent 29193c03bc
commit 8b6dab8d52
5 files changed
+155 -20

No files matched your search

+5 -4
View File
@@ -143,10 +143,10 @@ def launch(args):
else:
runs.mkdir(exist_ok=True)
run = Path(tempfile.mkdtemp(prefix="editor-", dir=runs)) / "project"
command = [
bundle / "bin" / binary_name("native_editor"), "--input-profile", profile,
source, bundle / FORMAT, bundle / RESOURCES, run, str(args.port), *assets,
]
command = [bundle / "bin" / binary_name("native_editor"), "--input-profile", profile]
if args.web_dir:
command.extend(["--web-dir", args.web_dir.resolve(strict=True)])
command.extend([source, bundle / FORMAT, bundle / RESOURCES, run, str(args.port), *assets])
else:
command = native_command(bundle / "bin" / binary_name("texrra"), profile, roots)
command.extend(["--load-format", bundle / FORMAT, args.entry.resolve(strict=True),
@@ -174,6 +174,7 @@ def main():
resume = commands.add_parser("resume", help="reopen a saved source snapshot")
resume.add_argument("snapshot", type=Path)
for command in (editor, resume):
command.add_argument("--web-dir", type=Path, help="use the texrra-web checkout")
command.add_argument("--run-dir", type=Path)
command.add_argument("--port", type=int, default=0)