Skip to content

Commit

Permalink
esbuild: build from source
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Jul 13, 2024
1 parent e579737 commit b90432a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Formula/e/esbuild.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
require "language/node"

class Esbuild < Formula
desc "Extremely fast JavaScript bundler and minifier"
homepage "https://esbuild.github.io/"
url "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz"
sha256 "1ba7823555e8960f2f2fac0b6656840f8de88c2237c00cb666229a887dc81fa7"
url "https://github.com/evanw/esbuild/archive/refs/tags/v0.23.0.tar.gz"
sha256 "473d4d322ddc35f3620d37ecd5d6f40890f33923eeaafa96f5d87db9587e77af"
license "MIT"

bottle do
Expand All @@ -17,11 +15,12 @@ class Esbuild < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "cf5ea30dc768145e289400d5e95ef9cfd467641b9ce06781334cda6360d59969"
end

depends_on "node"
depends_on "go" => :build
depends_on "node" => :test

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0"
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/esbuild"
end

test do
Expand Down

0 comments on commit b90432a

Please sign in to comment.