imageoptim-cli 2.3.5

Closes #40483.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Rui Chen 2019-05-29 23:52:05 -04:00 committed by FX Coudert
parent 1c1e885dbc
commit adba0598be

View file

@ -3,8 +3,8 @@ require "language/node"
class ImageoptimCli < Formula
desc "CLI for ImageOptim, ImageAlpha and JPEGmini"
homepage "https://jamiemason.github.io/ImageOptim-CLI/"
url "https://github.com/JamieMason/ImageOptim-CLI/archive/2.0.4.tar.gz"
sha256 "c26ba12425f100ab16e992f607e6d69527a6572b55cf287f5321a62ee61af390"
url "https://github.com/JamieMason/ImageOptim-CLI/archive/2.3.5.tar.gz"
sha256 "647849b7c8a15dff2ddf9dd054d70e6cfed78673bc1785c330c614f60cca83de"
bottle do
cellar :any_skip_relocation
@ -13,23 +13,14 @@ class ImageoptimCli < Formula
sha256 "bffc58868deab95f726d08ceba4060549a8d631a38f7c7978f7373a33fa84532" => :sierra
end
depends_on "node" => :build
resource "node" do
url "https://nodejs.org/dist/v10.9.0/node-v10.9.0.tar.xz"
sha256 "d17ef8eb72d6a31f50a663d554beb9bcb55aa2ce57cf189abfc9b1ba20530d02"
end
depends_on "node@10" => :build
depends_on "yarn" => :build
def install
# build node from source instead of downloading precompiled nexe node binary
resource("node").stage buildpath/".brew_home/.nexe"
inreplace "package.json", "\"build:bin\": \"nexe --target 'mac-x64-10.0.0' --input",
"\"build:bin\": \"nexe --build --target 'mac-x64-#{resource("node").version}' --loglevel=verbose --input"
system "npm", "ci", *Language::Node.local_npm_install_args
system "npm", "run-script", "build"
libexec.install "dist", "osascript"
bin.install_symlink libexec/"dist/imageoptim"
system "yarn"
system "npm", "run", "build"
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do