[Pkg-javascript-commits] [sockjs-client] 17/434: Allow uglify to rename even top objects.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:46:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 9b20e2db7b069a861f29b0d0b410617a9c5c3851
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Sun Jul 24 20:37:09 2011 +0100

    Allow uglify to rename even top objects.
---
 bin/render.coffee | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/render.coffee b/bin/render.coffee
index 24fdf47..2bce25f 100644
--- a/bin/render.coffee
+++ b/bin/render.coffee
@@ -26,7 +26,7 @@ array_flatten = (arr, acc) ->
 
 minify = (data, minify_options)->
     ast = uglify.parser.parse(data)
-    ast = uglify.uglify.ast_mangle(ast)
+    ast = uglify.uglify.ast_mangle(ast, minify_options)
     ast = uglify.uglify.ast_squeeze(ast)
     uglify.uglify.gen_code(ast, minify_options)
 
@@ -74,7 +74,7 @@ main = ->
         ['-p', '--pretty', 'Prettify javascript']
         ['-m', '--minify', 'Minify javascript']
     ]
-    options = {minify:false}
+    options = {minify:false, toplevel:true}
     parser = new optparse.OptionParser(switches)
     parser.on 'pretty', ->
                    options.beautify = true

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list