Skip to content

Commit 50f6820

Browse files
committed
Updated to use local uglifyjs.
1 parent 37fb0a5 commit 50f6820

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SPECVERSION=$(shell perl -ne 'print $$1 if /^version: *([0-9.]+)/' $(SPEC))
33
BENCHINP?=bench/samples/README.md
44
JSMODULES=$(wildcard lib/*.js)
55
VERSION?=$(SPECVERSION)
6+
UGLIFYJS=node_modules/uglify-js/bin/uglifyjs
67

78
.PHONY: dingus dist test bench bench-detailed npm lint clean update-spec
89

@@ -15,9 +16,12 @@ dist/commonmark.js: lib/index.js ${JSMODULES}
1516
browserify --standalone commonmark $< -o $@
1617

1718
# 'npm install -g uglify-js' for the uglifyjs tool:
18-
dist/commonmark.min.js: dist/commonmark.js
19-
uglifyjs --version # version should be at least 2.5.0
20-
uglifyjs $< --compress keep_fargs=true,pure_getters=true --preamble "/* commonmark $(VERSION) https://github.com/jgm/CommonMark @license BSD3 */" > $@
19+
dist/commonmark.min.js: dist/commonmark.js $(UGLIFYJS)
20+
$(UGLIFYJS) --version # version should be at least 2.5.0
21+
$(UGLIFYJS) $< --compress keep_fargs=true,pure_getters=true --preamble "/* commonmark $(VERSION) https://github.com/jgm/CommonMark @license BSD3 */" > $@
22+
23+
$(UGLIFYJS):
24+
npm install uglify-js
2125

2226
update-spec:
2327
curl 'https://raw.githubusercontent.com/jgm/CommonMark/master/spec.txt' > $(SPEC)

0 commit comments

Comments
 (0)