From ebad0905783d172df947c4484540fabdb7559ea7 Mon Sep 17 00:00:00 2001 From: Damien CORNEAU Date: Mon, 25 Jul 2016 14:20:06 +0900 Subject: [PATCH] Add cache buster for .js and .css file in zeppelin-web production build --- zeppelin-web/Gruntfile.js | 14 +++++++++++++- zeppelin-web/package.json | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js index 63abc337374..34f73040cc7 100644 --- a/zeppelin-web/Gruntfile.js +++ b/zeppelin-web/Gruntfile.js @@ -68,6 +68,17 @@ module.exports = function(grunt) { src: ['src/**/*.html'] }, + cacheBust: { + taskName: { + options: { + baseDir: '<%= yeoman.dist %>', + assets: ['scripts/**.js', 'styles/**.css'], + deleteOriginals: true + }, + src: ['<%= yeoman.dist %>/index.html'] + } + }, + 'goog-webfont-dl': { patuaOne: { options: { @@ -534,7 +545,8 @@ module.exports = function(grunt) { 'cssmin', 'uglify', 'usemin', - 'htmlmin' + 'htmlmin', + 'cacheBust' ]); grunt.registerTask('default', [ diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json index a8e035ac6e4..2ff74e69322 100644 --- a/zeppelin-web/package.json +++ b/zeppelin-web/package.json @@ -10,6 +10,7 @@ "autoprefixer": "^6.1.0", "bower": "1.7.2", "grunt": "^0.4.1", + "grunt-cache-bust": "^1.3.0", "grunt-cli": "^0.1.13", "grunt-concurrent": "^0.5.0", "grunt-contrib-clean": "^0.5.0",