Skip to content

Commit

Permalink
feat: update docs to use published floem version (#12)
Browse files Browse the repository at this point in the history
* chore: use published floem version

* adjust versions

* bump ver

* update usage
  • Loading branch information
golota60 authored Jan 14, 2024
1 parent 0f88c5a commit 3f57832
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 23 deletions.
13 changes: 13 additions & 0 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Currently, publishing is done manually. Simply,

1. Create a new branch
2. Bump the version and commit
3. Run the following commands

```
cargo publish -p oxytail-base
cargo publish -p oxytail-theme-dark
cargo publish -p oxytail-theme-defaults
```

4. Merge the release branch
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,15 @@ Showcase:

`oxytail` consists of the main "base" package(`oxytail-base`), which loads the theme you want, and theme packages(currently only `oxytail-theme-dark`. More coming soon!).

Next, you need to choose your theme, and install it. Currently, `oxytail` comes with only one theme, `oxytail-theme-dark`, but if it doesn't suit your needs you can [write your own one](YOUR_OWN_THEME.md). It's still early days for this project, so some widgets are missing.
Next, you need to choose your theme, and install it. Currently, `oxytail` comes with only one theme, `oxytail-theme-dark`, but if it doesn't suit your needs you can easily [write your own one](YOUR_OWN_THEME.md). It's still early days for this project, so some widgets are missing.

First, add floem(floem is not on crates.io just yet, so we need to add it as a git dependency) dependency to your `Cargo.toml`.
First, add `floem`, `oxytail-base`(to load a theme) and `oxytail-theme-dark`(or any other theme)

Next, add `oxytail-base`(to load a theme) and `oxytail-theme-dark`(or any other theme) also as a git dependency, since we rely on `floem`, which is not published.


```toml
[dependencies]

floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439" }
oxytail-theme-dark = { git = "https://github.com/golota60/oxytail"}
oxytail-base = { git = "https://github.com/golota60/oxytail"}
```
cargo add floem oxytail-base oxytail-theme-dark
```

Done! Now, initialize the theme, and simply use `floem` like normal, *except* import your widgets from `oxytail-base` instead of `floem`!
Done! Now, initialize the theme, and simply use `floem` like normal, *except* import your widgets from `oxytail-base` instead! You can't mix&match both `floem` and `oxytail` widgets as needed.

```rs
use floem::kurbo::Size;
Expand Down
7 changes: 3 additions & 4 deletions YOUR_OWN_THEME.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ You can specify colors and override those behaviors if needed.
So, install `floem`, `oxytail-theme-defaults` and `oxytail-base`.
```toml
[dependencies]
# Please check README.md for the most up-to-date `rev` value!
floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439"
oxytail-base = { path = "../oxytail-base" }
oxytail-theme-defaults = { path = "../oxytail-theme-defaults" }
floem = "0.1.1"
oxytail-base = "0.1.0"
oxytail-theme-defaults = "0.1.0"
```


Expand Down
2 changes: 1 addition & 1 deletion examples/widget-gallery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rust-version = "1.75"
im = "15.1.0"
oxytail-theme-dark = { path = "../../oxytail-theme-dark" }
oxytail-base = { path = "../../oxytail-base" }
floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439" }
floem = "0.1.1"
2 changes: 1 addition & 1 deletion oxytail-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ rust-version = "1.75"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439" }
floem = "0.1.1"

6 changes: 3 additions & 3 deletions oxytail-theme-dark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ rust-version = "1.75"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439" }
oxytail-base = { path = "../oxytail-base" }
oxytail-theme-defaults = { path = "../oxytail-theme-defaults" }
floem = "0.1.1"
oxytail-base = "0.1.0"
oxytail-theme-defaults = "0.1.0"
4 changes: 2 additions & 2 deletions oxytail-theme-defaults/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ rust-version = "1.75"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
floem = { git = "https://github.com/lapce/floem", rev = "e304d30f8771a28788904d64464d8fd192d07439" }
oxytail-base = { path = "../oxytail-base" }
floem = "0.1.1"
oxytail-base = "0.1.0"

0 comments on commit 3f57832

Please sign in to comment.