summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 16:02:40 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 16:02:40 -0500
commitad86bdc38b6cc17aa03f486df74e25e78d00498e (patch)
tree66fe2cc2972ddbdd212daa2f475f452c33690606 /Makefile
parentf524a67e0bfc498d748a2293bd57ee6f900fa9e5 (diff)
downloadhtml5ks-ad86bdc38b6cc17aa03f486df74e25e78d00498e.tar.xz
html5ks-ad86bdc38b6cc17aa03f486df74e25e78d00498e.zip
npm update before uglifyjs
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b66ce8d..696fb2f 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ CWEBP += -quiet -alpha_cleanup
WEBPMUX ?= webpmux
CONVERT ?= convert
APNGASM ?= apngasm
+NPM ?= npm
UGLIFYJS ?= node_modules/.bin/uglifyjs
ifndef MINIMAL
ZOPFLIPNG ?= zopflipng
@@ -151,10 +152,10 @@ JSOUT := www/js/all.min.js
Modernizr/dist/modernizr-build.js: Modernizr
ln -fs ../../config-all.json Modernizr/lib/config-all.json
- cd Modernizr && npm update && node_modules/.bin/grunt build
+ cd Modernizr && $(NPM) update && node_modules/.bin/grunt build
when/build/when.js: when
- export PYTHON=python2; cd when && npm update && npm run browserify-debug
+ export PYTHON=python2; cd when && $(NPM) update && $(NPM) run browserify-debug
js: $(JSOUT)
@@ -166,6 +167,7 @@ else
ifdef CLOSURE_COMPILER
$(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$^) --js_output_file "$@"
else
+ $(NPM) update
$(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false
endif
endif