Browse Source

Adds uglify to Makefile and minified version of the library.

dev1
hristoterezov 9 years ago
parent
commit
629add96e2
6 changed files with 1075 additions and 1176 deletions
  1. 2
    0
      .jshintignore
  2. 14
    2
      Makefile
  3. 867
    1173
      lib-jitsi-meet.js
  4. 177
    0
      lib-jitsi-meet.js.map
  5. 12
    0
      lib-jitsi-meet.min.js
  6. 3
    1
      package.json

+ 2
- 0
.jshintignore View File

@@ -1,6 +1,8 @@
1 1
 node_modules
2 2
 libs
3 3
 lib-jitsi-meet.js
4
+lib-jitsi-meet.min.js
5
+lib-jitsi-meet.js.map
4 6
 doc
5 7
 
6 8
 

+ 14
- 2
Makefile View File

@@ -1,14 +1,16 @@
1 1
 BROWSERIFY = ./node_modules/.bin/browserify
2
+UGLIFYJS = ./node_modules/.bin/uglifyjs
3
+EXORCIST = ./node_modules/.bin/exorcist
2 4
 GLOBAL_FLAGS =
3 5
 OUTPUT_DIR = .
4 6
 DEPLOY_DIR = ../../jitsi-meet
5 7
 
6
-all: compile deploy
8
+all: compile uglify deploy
7 9
 
8 10
 compile:FLAGS = $(GLOBAL_FLAGS)
9 11
 compile: app
10 12
 
11
-debug: compile-debug deploy
13
+debug: compile-debug source-maps uglify-debug deploy
12 14
 
13 15
 compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
14 16
 compile-debug: app
@@ -16,6 +18,16 @@ compile-debug: app
16 18
 app:
17 19
 	$(BROWSERIFY) $(FLAGS) JitsiMeetJS.js -s JitsiMeetJS -o $(OUTPUT_DIR)/lib-jitsi-meet.js
18 20
 
21
+source-maps:
22
+	cat $(OUTPUT_DIR)/lib-jitsi-meet.js | $(EXORCIST) $(OUTPUT_DIR)/lib-jitsi-meet.js.map
23
+
24
+uglify:SOURCE_MAPS=
25
+uglify:
26
+	$(UGLIFYJS) -p relative $(OUTPUT_DIR)/lib-jitsi-meet.js -o $(OUTPUT_DIR)/lib-jitsi-meet.min.js $(SOURCE_MAPS)
27
+
28
+uglify-debug:SOURCE_MAPS=--source-map $(OUTPUT_DIR)/lib-jitsi-meet.min.map --in-source-map $(OUTPUT_DIR)/lib-jitsi-meet.js.map
29
+uglify-debug: uglify
30
+
19 31
 clean:
20 32
 	rm -f $(OUTPUT_DIR)/lib-jitsi-meet.js
21 33
 

+ 867
- 1173
lib-jitsi-meet.js
File diff suppressed because it is too large
View File


+ 177
- 0
lib-jitsi-meet.js.map
File diff suppressed because it is too large
View File


+ 12
- 0
lib-jitsi-meet.min.js
File diff suppressed because it is too large
View File


+ 3
- 1
package.json View File

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

Loading…
Cancel
Save