Skip to content
Myr

Improve basics readme and fix some typos

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 5e623ec · Browse files · 2 files+16 added−18 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+16 added−18 removed

  • other:+16 added−18 removed

2 files+16 added−18 removed

modified:tutorials/basics/README.md+4 added-4 removed
4 unmodified lines
5Architecture][elm]. It might not seem very Go-like at first, but once you get6used to the general structure you'll find that most of the idomatic Go things7you know and love are still relevant and useful here.89By the way, the non-annotated version of of this program is available9By the way, the non-annotated source code for this program is available10[on GitHub](https://github.com/charmbracelet/bubbletea/master/tutorials/basics).1112This tutorial assumes you have a working knowledge of Go.13
3 unmodified lines
1718For this tutorial we're making a to-do list.1920To start we'll define our package and import some libraries. Our only external21import will be the Bubble Tea, library, which we'll call `tea` for short.21import will be the Bubble Tea library, which we'll call `tea` for short.2223```go24 package main25
201 unmodified lines
227* [The Charm Tool](https://github.com/charmbracelet/charm): the Charm user account manager228229### Libraries we use with Bubble Tea230231* [Bubbles][bubbles] various Bubble Tea components we've built231* [Bubbles][bubbles] various Bubble Tea components232* [Termenv][termenv]: Advanced ANSI styling for terminal applications233* [Reflow][reflow]: ANSI-aware methods for reflowing blocks of text234* [go-runewidth][runewidth]: Get the physical width of strings in terms of terminal cells. Many runes, such as East Asian charcters and emojis, are two cells wide, so measuring a layout with `len()` often won't cut it!234* [go-runewidth][runewidth]: Measure the physical width of strings in terms of terminal cells. Many runes, such as East Asian charcters and emojis, are two cells wide, so measuring a layout with `len()` often won't cut it.235236[termenv]: https://github.com/muesli/termenv237[reflow]: https://github.com/muesli/reflow238[bubbles]: https://github.com/charmbracelet/bubbles
8 unmodified lines
modified:README.md+12 added-14 removed
6 unmodified lines
7 <a href="https://github.com/charmbracelet/bubbletea/actions"><img src="https://github.com/charmbracelet/glow/workflows/build/badge.svg" alt="Build Status"></a>8</p>910The fun, functional and stateful way to build terminal apps. A Go framework11based on [The Elm Architecture][elm].11based on [The Elm Architecture][elm]. Bubble Tea is well-suited for simple and12complex terminal applications, either inline, full-window, or a mix of both.1313Bubble Tea is well-suited for simple and complex terminal applications,14either inline, full-window, or a mix of both. It's been battle-tested in15several large projects and is production-ready.14Bubble Tea has been battle-tested in several large projects and includes15a number of performance optimizations. Among those is a standard16framerate-based renderer as well as a renderer for high-performance scrollable17regions, which works alongside the main renderer.1817It features a standard framerate-based renderer which is used by default as18well as a renderer for high-performance scrollable regions, which works19alongside the main renderer.2019To get started, see the tutorials below, as well as the [examples][examples].202122## Tutorial
2 unmodified lines
25Architecture][elm]. It might not seem very Go-like at first, but once you get26used to the general structure you'll find that most of the idomatic Go things27you know and love are still relevant and useful here.2831By the way, the non-annotated version of of this program is available32[on GitHub](https://github.com/charmbracelet/bubbletea/master/tutorials/basics).29By the way, the non-annotated source code for this program30[is also available](https://github.com/charmbracelet/bubbletea/master/tutorials/basics).3132This tutorial assumes you have a working knowledge of Go.3334[elm]: https://guide.elm-lang.org/architecture/
1 unmodified line
36### Enough! Let's get to it.3738For this tutorial we're making a to-do list.3942To start we'll define our package and import some libraries. Our only external43import will be the Bubble Tea, library, which we'll call `tea` for short.40We'll start by defining our package and import some libraries. Our only external41import will be the Bubble Tea library, which we'll call `tea` for short.4243```go44 package main45
203 unmodified lines
249250251## Libraries we use with Bubble Tea252255* [Bubbles][bubbles] various Bubble Tea components we've built253* [Bubbles][bubbles] various Bubble Tea components254* [Termenv][termenv]: Advanced ANSI styling for terminal applications255* [Reflow][reflow]: ANSI-aware methods for reflowing blocks of text258* [go-runewidth][runewidth]: Get the physical width of strings in terms of terminal cells. Many runes, such as East Asian charcters and emojis, are two cells wide, so measuring a layout with `len()` often won't cut it!256* [go-runewidth][runewidth]: Measure the physical width of strings in terms of terminal cells. Many runes, such as East Asian charcters and emojis, are two cells wide, so measuring a layout with `len()` often won't cut it.257258[termenv]: https://github.com/muesli/termenv259[reflow]: https://github.com/muesli/reflow260[bubbles]: https://github.com/charmbracelet/bubbles
24 unmodified lines