Permalink
Browse files

- turn off sequences which breaks the uglify compressor when in somet…

…hing that resembles 'strict' mode

- see https://github.com/mishoo/UglifyJS/issues/339
- bump package
  • Loading branch information...
1 parent 4721e56 commit 5f563464286aa0418675a22f7ebfa499f2fcb886 @ded ded committed Mar 27, 2012
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/ender.file.js
  2. +1 −1 package.json
View
@@ -28,23 +28,23 @@ ENDER.file = module.exports = {
, token = '"Ender: preserved comment block"'
, reMultiComments = /\/\*![\s\S]*?\*\//g
- // we add a comma because uglify does too
- , reTokens = RegExp(token + ',', 'g')
+ , reTokens = RegExp(token, 'g')
, tok
, ast
, c
-
source = source.replace(reMultiComments, function(comment) {
comments.push(comment)
- return ';' + token + ';'
+ return token
})
tok = uglifyJS.parser.tokenizer(source)
c = tok()
ast = uglifyJS.parser.parse(source)
ast = uglifyJS.uglify.ast_mangle(ast)
- ast = uglifyJS.uglify.ast_squeeze(ast)
+ ast = uglifyJS.uglify.ast_squeeze(ast, {
+ make_seqs: false
+ })
source = uglifyJS.uglify.gen_code(ast)
source = source.replace(reTokens, function() {
View
@@ -1,7 +1,7 @@
{
"name": "ender"
, "description": "Open Module JavaScript Framework"
- , "version": "0.8.7"
+ , "version": "0.8.8"
, "authors": [
"Jacob Thornton <jacob@twitter.com> (https://github.com/fat)"
, "Dustin Diaz <dustin@obvious.com> (https://github.com/ded)"

0 comments on commit 5f56346

Please sign in to comment.