Skip to content

Commit

Permalink
Merge pull request #199320 from Homebrew/reveal-md
Browse files Browse the repository at this point in the history
reveal-md 6.1.4 (new formula)
  • Loading branch information
BrewTestBot authored Dec 15, 2024
2 parents c305550 + 25de3d7 commit 96b7469
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2594,6 +2594,7 @@ restic
restview
resvg
retire
reveal-md
revive
rex
rgbds
Expand Down
45 changes: 45 additions & 0 deletions Formula/r/reveal-md.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
class RevealMd < Formula
desc "Get beautiful reveal.js presentations from your Markdown files"
homepage "https://github.com/webpro/reveal-md"
url "https://registry.npmjs.org/reveal-md/-/reveal-md-6.1.4.tgz"
sha256 "699d44c19f8437f294464ca457d35ad779e6f605299a38ea293b7aa75363d6f9"
license "MIT"

bottle do
sha256 cellar: :any, arm64_sequoia: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70"
sha256 cellar: :any, arm64_sonoma: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70"
sha256 cellar: :any, arm64_ventura: "e45cc89fa82e2c457d6882e2a8c960c23733207a6af5cf19cd5dd9adb22f3f70"
sha256 cellar: :any, sonoma: "f986662f9ae9064474e4725339175621ec6cee8b57a45d65e1c05c75cfdd1dae"
sha256 cellar: :any, ventura: "f986662f9ae9064474e4725339175621ec6cee8b57a45d65e1c05c75cfdd1dae"
sha256 cellar: :any_skip_relocation, x86_64_linux: "615e2c3e56083005d3c26f52b444f663a75e9222f92c59df41266506b0d65d2d"
end

depends_on "node"

def install
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]

# Remove incompatible pre-built `bare-fs`/`bare-os` binaries
os = OS.kernel_name.downcase
arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s
node_modules = libexec/"lib/node_modules/reveal-md/node_modules"
node_modules.glob("{bare-fs,bare-os}/prebuilds/*")
.each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" }
end

test do
(testpath/"test.md").write("# Hello, Reveal-md!")

output_log = testpath/"output.log"
pid = spawn bin/"reveal-md", testpath/"test.md", [:out, :err] => output_log.to_s
sleep 8
sleep 8 if OS.mac? && Hardware::CPU.intel?
assert_match "Serving reveal.js", output_log.read

assert_match version.to_s, shell_output("#{bin}/reveal-md --version")
ensure
Process.kill("TERM", pid)
Process.wait(pid)
end
end

0 comments on commit 96b7469

Please sign in to comment.