diff --git a/grunt/browser_clients.js b/grunt/browser_clients.js index 9daac538d..bd89fb9b9 100644 --- a/grunt/browser_clients.js +++ b/grunt/browser_clients.js @@ -67,5 +67,4 @@ module.exports = function (grunt) { throw new Error('Aborting release'); } }); - -}; \ No newline at end of file +}; diff --git a/grunt/config/uglify.js b/grunt/config/uglify.js index 06b24eb28..2d2cdddbb 100644 --- a/grunt/config/uglify.js +++ b/grunt/config/uglify.js @@ -4,6 +4,35 @@ module.exports = { '<%= distDir %>/elasticsearch.min.js': '<%= distDir %>/elasticsearch.js', '<%= distDir %>/elasticsearch.angular.min.js': '<%= distDir %>/elasticsearch.angular.js', '<%= distDir %>/elasticsearch.jquery.min.js': '<%= distDir %>/elasticsearch.jquery.js' + }, + options: { + compress: { + sequences: true, + properties: true, + dead_code: true, + drop_debugger: true, + unsafe: true, + conditionals: true, + comparisons: true, + evaluate: true, + booleans: true, + loops: true, + unused: true, + hoist_funs: true, + if_return: true, + join_vars: true, + cascade: true, + negate_iife: true, + + pure_getters: false, + drop_console: false, + keep_fargs: false, + keep_fnames: false + }, + preserveComments: false, + screwIE8: true, + mangleProperties: true, + reserveDOMProperties: true } } -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index b0e8af64a..eb00df99e 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "grunt-contrib-compress": "~0.5.3", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-copy": "~0.4.1", - "grunt-contrib-uglify": "~0.2.7", + "grunt-contrib-uglify": "^0.11.0", "grunt-contrib-watch": "~0.5.3", "grunt-esvm": "^2.0.0", "grunt-mocha-cov": "^0.4.0",