Skip to content

Commit ead4cea

Browse files
committed
brew: add formula for v0.1.0 install
1 parent 1635181 commit ead4cea

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Formula/funee.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class Funee < Formula
2+
desc "Rust-based TypeScript runtime with macros, HTTP imports, and tree-shaking"
3+
homepage "https://github.com/offloadmywork/funee"
4+
url "https://github.com/offloadmywork/funee/archive/refs/tags/v0.1.0.tar.gz"
5+
sha256 "57e867c074fd69deaa6c9b2dadfb48c4d2f252f768d35d8add7f8ef917c69d2b"
6+
license "MIT"
7+
8+
depends_on "rust" => :build
9+
10+
def install
11+
system "cargo", "build", "--release"
12+
13+
libexec.install "funee-lib"
14+
libexec.install "target/release/funee"
15+
(bin/"funee").write_env_script libexec/"funee", FUNEE_LIB_PATH: libexec/"funee-lib/index.ts"
16+
end
17+
18+
test do
19+
(testpath/"hello.ts").write <<~TS
20+
import { log } from "host://console";
21+
export default () => {
22+
log("hello from brew test");
23+
};
24+
TS
25+
26+
assert_match "hello from brew test", shell_output("#{bin}/funee #{testpath}/hello.ts")
27+
end
28+
end

0 commit comments

Comments
 (0)