Skip to content

Commit

Permalink
Create an editor_cli target to make edit/refresh cycle faster
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen committed May 29, 2024
1 parent a10f247 commit c9928dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions mesop/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ py_binary(
deps = [":cli_lib"],
)

# Editor CLI
py_binary(
name = "editor_cli",
srcs = ["cli.py"],
data = COMMON_DATA + [
"//mesop/web/src/app/editor:web_package",
],
main = "cli.py",
tags = [
# This tag instructs ibazel to pipe into stdin a event describing actions.
"ibazel_notify_changes",
],
# Need to expose for Colab usage
visibility = ["//build_defs:mesop_users"],
deps = [":cli_lib"],
)

# Dev CLI
py_binary(
name = "dev_cli",
Expand Down
3 changes: 2 additions & 1 deletion scripts/cli.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Uses editor_cli which provides a faster development cycle than the regular "cli" target.
(lsof -t -i:32123 | xargs kill) || true && \
ibazel run //mesop/cli -- --path="mesop/mesop/example_index.py" --reload_demo_modules
ibazel run //mesop/cli:editor_cli -- --path="mesop/mesop/example_index.py" --reload_demo_modules

0 comments on commit c9928dc

Please sign in to comment.