Skip to content

Commit

Permalink
feat(whiskers): update catppuccin to v2 & add flavorName var (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardspy authored Mar 5, 2024
1 parent e8e23b0 commit 8e60740
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 96 deletions.
50 changes: 34 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions whiskers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ name = "whiskers"
path = "src/main.rs"

[dependencies]
base64 = "0.21"
catppuccin = { version = "1.4", features = ["css"] }
indexmap = { version = "2.2.3", features = ["serde"] }
base64 = "0.22"
catppuccin = { version = "2.0", features = ["css-colors"] }
indexmap = { version = "2.2", features = ["serde"] }
clap = { version = "4.5", features = ["derive"] }
clap-stdin = "0.4.0"
clap-stdin = "0.4"
color-eyre = { version = "0.6", default-features = false }
css-colors = "1.0"
handlebars = "4.5"
handlebars = "5.1"
regex = "1.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"] }
serde_yaml = "0.9"
tempfile = "3.10"
thiserror = "1.0"
titlecase = "2.2"
json-patch = "1.2.0"
json-patch = "1.2"

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1.0"
predicates = "3.1"
6 changes: 3 additions & 3 deletions whiskers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ overrides:

When running `whiskers example.yml {latte, frappe, macchiato, mocha}`, we see that:

- Frappe & Macchiato will have the accent `mauve` hex code.
- Frappé & Macchiato will have the accent `mauve` hex code.
- Latte will have the accent `pink` hex code.
- Mocha will have the accent `blue` hex code.

Expand Down Expand Up @@ -340,7 +340,7 @@ This allows us to define a template file like the following:
# Single File
{{#each flavors}}
## {{titlecase flavor}}
## {{flavorName}}
Accent: #{{mauve}}
{{/each}}
```
Expand All @@ -354,7 +354,7 @@ and after running `whiskers input.md all -o README.md`, we get the following out
## Latte
Accent: #8839ef
## Frappe
## Frappé
Accent: #ca9ee6
## Macchiato
Accent: #c6a0f6
Expand Down
2 changes: 1 addition & 1 deletion whiskers/examples/demo/input.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Demo

**flavor:** {{ titlecase flavor }}
**flavor:** {{ flavorName }}

### Colours

Expand Down
4 changes: 2 additions & 2 deletions whiskers/examples/demo/output/frappe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Demo

**flavor:** Frappe
**flavor:** Frappé

### Colours

Expand All @@ -20,4 +20,4 @@ this is a dark theme

### Misc

unquote this: false
unquote this: false
2 changes: 1 addition & 1 deletion whiskers/examples/frontmatter/input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ accent: "{{ #if isLight }}{{ pink }}{{ ^ }}{{ mauve }}{{ /if }}"

## Demo With Frontmatter

**flavor:** {{ titlecase flavor }}
**flavor:** {{ flavorName }}

This file also contains variables that have been defined in the frontmatter, as shown below:

Expand Down
4 changes: 2 additions & 2 deletions whiskers/examples/frontmatter/output/frappe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Demo With Frontmatter

**flavor:** Frappe
**flavor:** Frappé

This file also contains variables that have been defined in the frontmatter, as shown below:

Expand All @@ -27,4 +27,4 @@ this is a dark theme

### Misc

unquote this: false
unquote this: false
2 changes: 1 addition & 1 deletion whiskers/examples/single-file/overrides/input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ overrides:
# Single File With Overrides

{{#each flavors}}
## {{emoji}} {{titlecase flavor}}
## {{emoji}} {{flavorName}}

{{user}}'s favourite hex code is #{{accent}}

Expand Down
4 changes: 2 additions & 2 deletions whiskers/examples/single-file/simple/input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{#each flavors}}
<details open>
<summary>{{titlecase flavor}}</summary>
<summary>{{flavorName}}</summary>
<table>
<tr>
<th></th>
Expand All @@ -22,4 +22,4 @@
{{/each}}
</table>
</details>
{{/each}}
{{/each}}
2 changes: 1 addition & 1 deletion whiskers/examples/single-file/simple/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
</table>
</details>
<details open>
<summary>Frappe</summary>
<summary>Frappé</summary>
<table>
<tr>
<th></th>
Expand Down
Loading

0 comments on commit 8e60740

Please sign in to comment.