diff --git a/Formula/mdbook-catppuccin.rb b/Formula/mdbook-catppuccin.rb new file mode 100644 index 0000000..04849d0 --- /dev/null +++ b/Formula/mdbook-catppuccin.rb @@ -0,0 +1,24 @@ +class MdbookCatppuccin < Formula + desc "Soothing pastel theme for mdBook" + homepage "https://github.com/catppuccin/mdBook" + url "https://github.com/catppuccin/mdBook/archive/refs/tags/v2.0.1.tar.gz" + sha256 "75062a0e4561d0b067c8b200ba4fc7eb66df59e15e568de08bcf800ab76c8781" + license "MIT" + head "https://github.com/catppuccin/mdbook.git", branch: "main" + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"book.toml").write("") + + system bin/"mdbook-catppuccin", "install" + + assert_predicate (testpath/"theme/index.hbs"), :exist? + assert_predicate (testpath/"theme/catppuccin.css"), :exist? + assert_predicate (testpath/"theme/catppuccin-admonish.css"), :exist? + end +end