Skip to content

Commit 01a02c8

Browse files
committed
fix: Fixed npm install failed when other package depend on this
release.sh needed detect uglifyjs is exist or not
1 parent f1d3e85 commit 01a02c8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

release.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/bash
2-
./node_modules/.bin/uglifyjs --compress --mangle --output codemirror.min.js \
2+
3+
uglify=$(which uglifyjs)
4+
5+
if [ -z "$uglify" ]; then
6+
uglify=./node_modules/.bin/uglifyjs
7+
fi
8+
9+
$uglify --compress --mangle --output codemirror.min.js \
310
lib/codemirror.js \
411
addon/mode/overlay.js \
512
addon/mode/simple.js \

0 commit comments

Comments
 (0)