Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable renderer #61

Merged
merged 1 commit into from
Mar 7, 2021
Merged

Add option to disable renderer #61

merged 1 commit into from
Mar 7, 2021

Conversation

meowgorithm
Copy link
Member

@meowgorithm meowgorithm commented Mar 7, 2021

This PR introduces WithoutRenderer, a ProgramOption for disabling the Bubble Tea standard renderer. When WithoutRenderer is set Bubble Tea won't manage rendering and print and log statements will, by default, go straight to standard output.

This opens up a few possibilities:

  • Daemon Mode: It's now possible for your Bubble Tea program to also operate as a daemon in addition to a TUI. See the daemon-tui-combo example for an example implementation.
  • Non-TTY Mode: If output’s not a TTY your Bubble Tea program can simply print or log output to stdout. See the daemon-tui-combo example for an example implementation.
  • General Purpose Application Development: It's now possible to use the Bubble Tea framework for general purpose application development. That is to say, your can take advantage of this implementation of The Elm Architecture to build other types of applications, like servers, GUIs and so on.

The Nil Renderer essentially disables the Bubble Tea renderer sending
loggings and print statements to stdout. It can be enabled via the
ProgramOption WithoutRenderer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant