Permalink
Browse files

Merge pull request #342 from int3/master

Allow defines even when not mangling.
  • Loading branch information...
2 parents 67e6163 + 50ee352 commit e06dc6a0d5945ee27b44dce876553a07b71fae2c @mishoo mishoo committed May 1, 2012
Showing with 3 additions and 1 deletion.
  1. +2 −1 bin/uglifyjs
  2. +1 −0 lib/process.js
View
@@ -290,8 +290,9 @@ function squeeze_it(code) {
if (options.lift_vars) {
ast = time_it("lift", function(){ return pro.ast_lift_variables(ast); });
}
- if (options.mangle) ast = time_it("mangle", function(){
+ ast = time_it("mangle", function(){
return pro.ast_mangle(ast, {
+ mangle : options.mangle,
toplevel : options.mangle_toplevel,
defines : options.defines,
except : options.reserved_names,
View
@@ -505,6 +505,7 @@ function ast_mangle(ast, options) {
options = options || {};
function get_mangled(name, newMangle) {
+ if (!options.mangle) return name;
if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel
if (options.except && member(name, options.except))
return name;

0 comments on commit e06dc6a

Please sign in to comment.