diff --git a/endpoints/common.py b/endpoints/common.py index 82eca081b..1efa47637 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -120,7 +120,7 @@ def render_page_template(name, **kwargs): main_styles = ['dist/quay-frontend.css'] library_scripts = [] - main_scripts = ['dist/quay-frontend.js'] + main_scripts = ['dist/quay-frontend.min.js'] cache_buster = random_string() diff --git a/grunt/Gruntfile.js b/grunt/Gruntfile.js index 4b1d30a0c..249e13378 100644 --- a/grunt/Gruntfile.js +++ b/grunt/Gruntfile.js @@ -32,12 +32,24 @@ module.exports = function(grunt) { cssmin: { '../static/dist/<%= pkg.name %>.css': ['../static/lib/**/*.css', '../static/css/*.css'] + }, + + uglify: { + options: { + mangle: false + }, + js_min: { + files: { + '../static/dist/<%= pkg.name %>.min.js': ['../static/dist/<%= pkg.name %>.js'] + } + } } }); + grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-cssmin'); // Default task(s). - grunt.registerTask('default', ['concat', 'cssmin']); + grunt.registerTask('default', ['concat', 'cssmin', 'uglify']); }; \ No newline at end of file diff --git a/grunt/package.json b/grunt/package.json index 51c159b04..e4d9836a3 100644 --- a/grunt/package.json +++ b/grunt/package.json @@ -5,6 +5,7 @@ "grunt": "~0.4.4", "grunt-contrib-concat": "~0.4.0", "grunt-contrib-cssmin": "~0.9.0", - "grunt-angular-templates": "~0.5.4" + "grunt-angular-templates": "~0.5.4", + "grunt-contrib-uglify": "~0.4.0" } } diff --git a/templates/base.html b/templates/base.html index b96223fb7..d88e55a80 100644 --- a/templates/base.html +++ b/templates/base.html @@ -58,7 +58,7 @@ - + {% for script_path in library_scripts %}