Skip to content

Commit 84749aa

Browse files
committed
cookcli: build frontend assets
Add Node.js build dependency and npm build steps to compile the Tailwind CSS frontend assets during installation. This ensures the web server interface has all required static files when installed via Homebrew. The formula now: - Installs npm dependencies with `npm ci` - Builds CSS with `npm run build-css` - Installs static assets to pkgshare directory
1 parent 17a1379 commit 84749aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Formula/c/cookcli.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ class Cookcli < Formula
1515
sha256 cellar: :any_skip_relocation, x86_64_linux: "aa0f606df53567658253934322d581095af09b97572d5e1a7e4e9c48d97db52f"
1616
end
1717

18+
depends_on "node" => :build
1819
depends_on "rust" => :build
1920
depends_on "openssl@3"
2021

2122
def install
2223
ENV["OPENSSL_NO_VENDOR"] = "1"
2324
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
25+
26+
# Install npm dependencies and build CSS
27+
system "npm", "install", *std_npm_args(prefix: false), "--ignore-scripts"
28+
system "npm", "run", "build-css"
29+
30+
# Build and install the binary
2431
system "cargo", "install", *std_cargo_args
2532
end
2633

0 commit comments

Comments
 (0)