Browse Source

new uglify

Namdak Tonpa 8 years ago
parent
commit
d821e57e14
3 changed files with 3 additions and 3 deletions
  1. 1 1
      include/mad.hrl
  2. BIN
      mad
  3. 2 2
      src/mad_static.erl

+ 1 - 1
include/mad.hrl

@@ -1 +1 @@
--define(VERSION,"f4aae7").
+-define(VERSION,"64c5dd").

BIN
mad


+ 2 - 2
src/mad_static.erl

@@ -8,8 +8,8 @@ main(Config, ["min"]) ->
     N2O     = proplists:get_value(n2o,SysConfig,[]),
     N2O     = proplists:get_value(n2o,SysConfig,[]),
     AppName = proplists:get_value(app,N2O,sample),
     AppName = proplists:get_value(app,N2O,sample),
     Minify  = proplists:get_value(minify,N2O,[]),
     Minify  = proplists:get_value(minify,N2O,[]),
-    Command = lists:concat(["uglifyjs ",string:join(element(2,Minify)," "),
-                                 " -o ",element(1,Minify),"/",AppName,".min.js -p 5 -c -m"]),
+    Command = lists:concat(["uglify -s ",string:join(element(2,Minify),","),
+                                 " -o ",element(1,Minify),"/",AppName,".min.js"]),
     io:format("Minify: ~p~n",[Command]),
     io:format("Minify: ~p~n",[Command]),
     case sh:run(Command) of
     case sh:run(Command) of
          {_,0,_} -> {ok,static};
          {_,0,_} -> {ok,static};