Merge pull request #512 from galfert/node_binary_fix
[remotestorage.js] / Makefile
index 08e0984..822d6eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ DOC_BIN        = naturaldocs
 DOC_DIR        = ./doc/code
 DOC_CONFIG_DIR = ./doc/config
 DOC_CUSTOM_CSS = custom-1
+UGLIFY_BIN     = ./node_modules/.bin/uglifyjs
 SOURCE_DIR     = ./src
 ASSETS_DIR     = ./assets
 ASSETS_OUT     = $(SOURCE_DIR)/assets.js
@@ -11,7 +12,7 @@ SOURCES        = ${shell find $(SOURCE_DIR) -name "*.js"}
 
 DEFAULT_COMPONENTS = core widget baseclient caching modules debug legacy googledrive dropbox
 NOCACHE_COMPONENTS = core widget baseclient modules debug legacy googledrive dropbox
-NODEJS_COMPONENTS = core baseclient caching modules legacy
+NODEJS_COMPONENTS  = core baseclient caching modules legacy nodejs
 
 
 default: help
@@ -27,7 +28,9 @@ help:
        @echo "compile-assets - compile $(ASSETS_DIR)/* into $(ASSETS_OUT)"
        @echo "clean          - remove all builds and editor swapfiles"
 
+
 all: compile-assets build build-amd minify build-nocache build-node doc
+
 build-all: all
 minify: remotestorage.min.js
 build: remotestorage.js
@@ -39,7 +42,8 @@ compile-assets: $(ASSETS_OUT)
 .PHONY: help buildserver build-all compile-assets minify build doc clean
 
 %.min.js: %.js
-       uglifyjs $< -o $@ --mangle --wrap --export-all
+#      uglifyjs $< -o $@ --mangle --wrap --export-all
+       $(UGLIFY_BIN) -o $@ $<
        mv $@ $@.tmp
        head -n1 $< > $@
        cat $@.tmp >> $@