homebrew-cask/Casks/electron.rb

32 lines
873 B
Ruby

cask "electron" do
arch = Hardware::CPU.intel? ? "x64" : "arm64"
version "16.0.4"
if Hardware::CPU.intel?
sha256 "0a4621c1137ce158cf396af30b732df72fa61a4ea04bc55d3d9f9915267fe8e9"
else
sha256 "0c047fd840bc7d77d36d3b0c4a6b6b8331ce0786527fa33455a7b3ee47eb0020"
end
url "https://github.com/electron/electron/releases/download/v#{version}/electron-v#{version}-darwin-#{arch}.zip",
verified: "github.com/electron/electron/"
name "Electron"
desc "Build desktop apps with JavaScript, HTML, and CSS"
homepage "https://electronjs.org/"
livecheck do
url :url
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
app "Electron.app"
zap trash: [
"~/Library/Application Support/Electron",
"~/Library/Caches/Electron",
"~/Library/Preferences/com.github.electron.helper.plist",
"~/Library/Preferences/com.github.electron.plist",
]
end