Skip to content

Commit

Permalink
Add --no-clear-screen to docs (#16364)
Browse files Browse the repository at this point in the history
  • Loading branch information
sroussey authored Jan 13, 2025
1 parent 36ad297 commit da5a1a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/runtime/hot.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ $ bun --watch test

![bun test gif](https://user-images.githubusercontent.com/709451/228396976-38a23864-4a1d-4c96-87cc-04e5181bf459.gif)

{% callout %}

The **`--no-clear-screen`** flag is useful in scenarios where you don’t want the terminal to clear, such as when running multiple `bun build --watch` commands simultaneously using tools like `concurrently`. Without this flag, the output of one instance could clear the output of others, potentially hiding errors from one instance beneath the output of another. The `--no-clear-screen` flag, similar to TypeScript’s `--preserveWatchOutput`, prevents this issue. It can be used in combination with `--watch`, for example: `bun build --watch --no-clear-screen`.

{% /callout %}


## `--hot` mode

Use `bun --hot` to enable hot reloading when executing code with Bun. This is distinct from `--watch` mode in that Bun does not hard-restart the entire process. Instead, it detects code changes and updates its internal module cache with the new code.
Expand Down

0 comments on commit da5a1a9

Please sign in to comment.