Skip to content

Commit ef99424

Browse files
committed
updated espruinotools after minifying error fixed
1 parent c357d51 commit ef99424

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

lib/espruinotools.js

+2-15
Original file line numberDiff line numberDiff line change
@@ -37099,24 +37099,11 @@ global.esmangle = require('../lib/esmangle');
3709937099
};
3710037100
})();
3710137101

37102-
var minifyCode = code;
37103-
var minifyCallback = callback;
37104-
if (isModule) {
37105-
/* if we're a module, we wrap this in a function so that unused constants
37106-
and functions can be removed */
37107-
var header = "(function(){";
37108-
var footer = "})();";
37109-
minifyCode = header+code+footer;
37110-
minifyCallback = function (minified){
37111-
callback(minified.substr(header.length, minified.length-(header.length+footer.length+1)));
37112-
}
37113-
}
37114-
3711537102
switch(level){
3711637103
case "WHITESPACE_ONLY":
3711737104
case "SIMPLE_OPTIMIZATIONS":
37118-
case "ADVANCED_OPTIMIZATIONS": minifyCodeGoogle(minifyCode, minifyCallback, level, description); break;
37119-
case "ESPRIMA": minifyCodeEsprima(minifyCode, minifyCallback, description); break;
37105+
case "ADVANCED_OPTIMIZATIONS": minifyCodeGoogle(code, callback, level, description); break;
37106+
case "ESPRIMA": minifyCodeEsprima(code, callback, description); break;
3712037107
default: callback(code); break;
3712137108
}
3712237109
}

0 commit comments

Comments
 (0)