Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Uses source maps to the actual source files (i.e. modules/), removes the separate debug targets, uglify before deploy.

Boris Grozev2702fa01752b
diff --git a/Makefile b/Makefile
index c8d0f51686..b1eab95440 100644
--- a/Makefile
+++ b/Makefile
@@ -1,34 +1,27 @@
+NPM = npm
BROWSERIFY = ./node_modules/.bin/browserify
+UGLIFYJS = ./node_modules/.bin/uglifyjs
+EXORCIST = ./node_modules/.bin/exorcist
DEPLOY_DIR = libs
-GLOBAL_FLAGS = -x jquery -e
-NPM = npm
+BROWSERIFY_FLAGS = -d -x jquery
OUTPUT_DIR = .
-UGLIFYJS = ./node_modules/.bin/uglifyjs
-
-all: compile deploy clean uglify
-
-compile:FLAGS = $(GLOBAL_FLAGS)
-compile: app
-
-debug: compile-debug deploy clean
-compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
-compile-debug: app
+all: compile uglify deploy clean
-app:
- $(NPM) update && $(BROWSERIFY) $(FLAGS) app.js -s APP -o $(OUTPUT_DIR)/app.bundle.js
+compile:
+ $(NPM) update && $(BROWSERIFY) $(BROWSERIFY_FLAGS) -e app.js -s APP | $(EXORCIST) $(OUTPUT_DIR)/app.bundle.js.map > $(OUTPUT_DIR)/app.bundle.js
clean:
- rm -f $(OUTPUT_DIR)/*.bundle.js
+ rm -f $(OUTPUT_DIR)/app.bundle.*
deploy:
mkdir -p $(DEPLOY_DIR) && \
- cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR) && \
+ cp $(OUTPUT_DIR)/app.bundle.min.js $(OUTPUT_DIR)/app.bundle.min.map $(DEPLOY_DIR) && \
./bump-js-versions.sh && \
([ ! -x deploy-local.sh ] || ./deploy-local.sh)
uglify:
- $(UGLIFYJS) -p relative libs/app.bundle.js -o libs/app.bundle.min.js --source-map libs/app.bundle.js.map --source-map-url=app.bundle.js.map
+ $(UGLIFYJS) -p relative $(OUTPUT_DIR)/app.bundle.js -o $(OUTPUT_DIR)/app.bundle.min.js --source-map $(OUTPUT_DIR)/app.bundle.min.map --in-source-map $(OUTPUT_DIR)/app.bundle.js.map
source-package:
mkdir -p source_package/jitsi-meet && \
diff --git a/package.json b/package.json
index 5375a54270..4a82948df4 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,8 @@
"precommit-hook": "3.0.0",
"jshint": "2.8.0",
"uglify-js": "2.4.24",
- "browserify": "11.1.x"
+ "browserify": "11.1.x",
+ "exorcist": "*"
},
"license": "Apache-2.0",
"scripts": {