Commit c1ab774e authored by Markus Frosch's avatar Markus Frosch 📣

Improve javascript uglify handling

Auto detect javascript files.
parent c3484c99
Pipeline #4436 passed with stages
in 9 minutes and 37 seconds
......@@ -3,9 +3,9 @@
#
# Fallback to yui-compressor if uglifyjs is not available.
SOURCE_PATH = ../../public/js/vendor
SOURCES = jquery-1.11.0.js jquery-2.1.0.js jquery.sparkline.js jquery.tipsy.js
FILES = $(patsubst %.js,%.min.js,$(SOURCES))
SOURCE_PATH := ../../public/js/vendor
SOURCES := $(filter-out %.min.js,$(notdir $(wildcard $(SOURCE_PATH)/*.js)))
MINIFIED := $(patsubst %.js,%.min.js,$(SOURCES))
UGLIFY_OPTS = -m "toplevel=true" -r '$$,require,exports' -c "hoist_funs=false,loops=false,unused=false"
......@@ -18,7 +18,7 @@ clean:
source: $(SOURCES)
uglify: $(FILES)
uglify: $(MINIFIED)
%.min.js: %.js
$(eval map := $(patsubst %.min.js,%.min.map,$@))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment