Skip to content

Commit

Permalink
Fix NodeJS binding build-from-source, fixes #701
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed May 21, 2024
1 parent ac9e20d commit e704909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindings/js/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SHELL=/usr/bin/env bash
HASH=`git log -1 --format="%H"`
VERSION=`git describe --tags --abbrev=0 | cut -b 2-`
NODE_VERSION=`node -e 'console.log(require('./package.json').version);'`

# needed explicitly for Windows
export CGO_ENABLED=1
Expand All @@ -16,7 +17,7 @@ all: build
# called by node-gyp for build-from-source
compile:
go mod init
go get github.com/tdewolff/minify/v2@${HASH}
go get github.com/tdewolff/minify/v2@${NODE_VERSION}
go build -buildmode=c-archive -o minify.a minify.go

build:
Expand Down

0 comments on commit e704909

Please sign in to comment.