Skip to content

Commit

Permalink
Rename project to 'matcha'
Browse files Browse the repository at this point in the history
The last name was quite short lived! I didn't like the double barrelled
nature of it in the end and this seems just as suitable.
  • Loading branch information
michaeljones committed Apr 2, 2022
1 parent 46d953e commit 1ad782b
Show file tree
Hide file tree
Showing 85 changed files with 63 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: green-tea-${{ matrix.target }}
path: target/debug/green-tea
name: matcha-${{ matrix.target }}
path: target/debug/matcha
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ jobs:
run: |
VERSION="${GITHUB_REF#refs/tags/}"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
ARCHIVE="green-tea-$VERSION-${{ matrix.build }}.zip"
cp "target/release/green-tea.exe" "green-tea.exe"
7z a "$ARCHIVE" "green-tea.exe"
rm green-tea.exe
ARCHIVE="matcha-$VERSION-${{ matrix.build }}.zip"
cp "target/release/matcha.exe" "matcha.exe"
7z a "$ARCHIVE" "matcha.exe"
rm matcha.exe
else
ARCHIVE="green-tea-$VERSION-${{ matrix.build }}.tar.gz"
cp "target/release/green-tea" "green-tea"
tar -czvf "$ARCHIVE" "green-tea"
rm green-tea
ARCHIVE="matcha-$VERSION-${{ matrix.build }}.tar.gz"
cp "target/release/matcha" "matcha"
tar -czvf "$ARCHIVE" "matcha"
rm matcha
fi
openssl dgst -r -sha256 -out "$ARCHIVE".sha256 "$ARCHIVE"
openssl dgst -r -sha512 -out "$ARCHIVE".sha512 "$ARCHIVE"
Expand Down Expand Up @@ -110,9 +110,9 @@ jobs:
shell: bash
run: |
VERSION="${GITHUB_REF#refs/tags/}"
ARCHIVE="green-tea-$VERSION-linux-amd64.tar.gz"
cp "target/x86_64-unknown-linux-musl/release/green-tea" "green-tea"
tar -czvf "$ARCHIVE" "green-tea"
ARCHIVE="matcha-$VERSION-linux-amd64.tar.gz"
cp "target/x86_64-unknown-linux-musl/release/matcha" "matcha"
tar -czvf "$ARCHIVE" "matcha"
openssl dgst -r -sha256 -out "$ARCHIVE".sha256 "$ARCHIVE"
openssl dgst -r -sha512 -out "$ARCHIVE".sha512 "$ARCHIVE"
echo "ASSET=$ARCHIVE" >> $GITHUB_ENV
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.13.0

- **Breaking change**: Rename the project to 'matcha' to remove the double-barrelled nature of the
previous name and avoid the clash with the `.tea` extension name.

- **Breaking change**: The template files should now have a `.matcha` suffix instead of `.tea`.

## 0.12.0

- **Breaking change**: Rename the project to 'green-tea' as the previous name was essentially
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "green-tea"
version = "0.12.0"
name = "matcha"
version = "0.13.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Green Tea
# Matcha

Generate type-safe Gleam modules from text-based template files.

Expand All @@ -9,7 +9,7 @@ parameters.
## Installation

Download pre-built binaries for the latest release from the
[Releases](https://github.com/michaeljones/green-tea/releases) page.
[Releases](https://github.com/michaeljones/matcha/releases) page.

Build from source with:

Expand All @@ -22,13 +22,13 @@ cargo install --path .
Run:

```
green-tea
matcha
```

At the root of your project and it will walk your project folder structure and compile any template
files it finds.

Template files should have a `.tea` extension. Templates are compiled into `.gleam` files that can
Template files should have a `.matcha` extension. Templates are compiled into `.gleam` files that can
be imported like any other regular module. The modules expose a `render` function, that returns a
`String`, and `render_builder` function that returns a `StringBuilder`.

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn color_choice() -> ColorChoice {
}

#[derive(Debug, StructOpt)]
#[structopt(name = "green-tea", about = "Compiles templates into Gleam modules")]
#[structopt(name = "matcha", about = "Compiles templates into Gleam modules")]
struct Opt {
#[structopt(short, long)]
verbose: bool,
Expand All @@ -85,7 +85,7 @@ fn main() {
.filter_map(|entry| {
let path = entry.path();

if path.extension() == Some(std::ffi::OsStr::new("tea")) {
if path.extension() == Some(std::ffi::OsStr::new("matcha")) {
if opt.verbose {
println!("Converting {}", path.display());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with name as StringBuilder\nHello {[ name ]}, good to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "Hello {[ string_builder.from_strings([\"Anna\", \" and \", \"Bob\"]) ]}, good to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with user as MyUser\nHello{% if user.is_admin %} Admin{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with is_user as Bool\nHello {% if is_user %}{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with list as List(Item)\nHello,{% for item as Item in list %} to {{ item }} and {% endfor %} everyone else"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "Hello {% for item as Item in list.take(list, 2) %}{{ item }}{% endfor %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with list as List(String)\nHello,{% for item in list %} to {{ item }} and {% endfor %} everyone else"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> import gleam/string\nHello {{ string.uppercase(name) }}, good to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with name as String\nHello {{ name }}, good to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "Hello {% if items != [] %}Some items{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with is_user as Bool\nHello {% if is_user %}User{% else %}Unknown{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with is_user as Bool\nHello {% if is_user %}User{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> import user.{User}\n{> with name as String\n{{ name }}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> import user.{User}\n{> with user as User\n{{ user }}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with my_list as List(String)\n<ul>\n{% for entry in my_list %}\n <li>{{ entry }}</li>\n{% endfor %}\n</ul>"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with is_user as Bool\n{> with is_admin as Bool\nHello {% if is_user %}{% if is_admin %}Admin{% else %}User{% endif %}{% endif %}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "Hello name, good to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with name as String\n<div class=\"my-class\">{{ name }}</div>"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with name as String\n{> with adjective as String\nHello {{ name }}, {{ adjective }} to meet you"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with user as User\n{{ user }}"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/renderer.rs
expression: "{> with name as String\n{{ name }} usage, {{ name }} usage"
---
// DO NOT EDIT: Code generated by green-tea from -test-
// DO NOT EDIT: Code generated by matcha from -test-

import gleam/string_builder.{StringBuilder}
import gleam/list
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1ad782b

Please sign in to comment.