Adds uglify to Makefile and minified version of the library.

This commit is contained in:
hristoterezov 2015-12-30 14:56:46 -06:00
parent fc5e22ac29
commit 6deea8bca2
6 changed files with 728 additions and 829 deletions

View File

@ -1,6 +1,8 @@
node_modules
libs
lib-jitsi-meet.js
lib-jitsi-meet.min.js
lib-jitsi-meet.js.map
doc

View File

@ -1,14 +1,16 @@
BROWSERIFY = ./node_modules/.bin/browserify
UGLIFYJS = ./node_modules/.bin/uglifyjs
EXORCIST = ./node_modules/.bin/exorcist
GLOBAL_FLAGS =
OUTPUT_DIR = .
DEPLOY_DIR = ../../jitsi-meet
all: compile deploy
all: compile uglify deploy
compile:FLAGS = $(GLOBAL_FLAGS)
compile: app
debug: compile-debug deploy
debug: compile-debug source-maps uglify-debug deploy
compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
compile-debug: app
@ -16,6 +18,16 @@ compile-debug: app
app:
$(BROWSERIFY) $(FLAGS) JitsiMeetJS.js -s JitsiMeetJS -o $(OUTPUT_DIR)/lib-jitsi-meet.js
source-maps:
cat $(OUTPUT_DIR)/lib-jitsi-meet.js | $(EXORCIST) $(OUTPUT_DIR)/lib-jitsi-meet.js.map
uglify:SOURCE_MAPS=
uglify:
$(UGLIFYJS) -p relative $(OUTPUT_DIR)/lib-jitsi-meet.js -o $(OUTPUT_DIR)/lib-jitsi-meet.min.js $(SOURCE_MAPS)
uglify-debug:SOURCE_MAPS=--source-map $(OUTPUT_DIR)/lib-jitsi-meet.min.map --in-source-map $(OUTPUT_DIR)/lib-jitsi-meet.js.map
uglify-debug: uglify
clean:
rm -f $(OUTPUT_DIR)/lib-jitsi-meet.js

File diff suppressed because one or more lines are too long

177
lib-jitsi-meet.js.map Normal file

File diff suppressed because one or more lines are too long

12
lib-jitsi-meet.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,9 @@
"devDependencies": {
"browserify": "11.1.x",
"jshint": "^2.8.0",
"precommit-hook": "^3.0.0"
"precommit-hook": "^3.0.0",
"exorcist": "*",
"uglify-js": "2.4.24"
},
"scripts": {
"lint": "./node_modules/.bin/jshint .",