[TASK] Add cache breaker

This commit is contained in:
Xaver Maierhofer 2016-05-29 18:22:06 +02:00
parent 7a988ea378
commit 75d107e220
3 changed files with 13 additions and 2 deletions

View File

@ -3,8 +3,7 @@ module.exports = function (grunt) {
grunt.loadTasks("tasks");
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "cachebreaker", "inline"]);
grunt.registerTask("lint", ["sasslint", "eslint"]);
grunt.registerTask("serve", ["bower-install-simple", "lint", "copy", "sass", "requirejs:dev", "browserSync", "watch"]);
};

View File

@ -18,6 +18,7 @@
"grunt": "^1.0.1",
"grunt-bower-install-simple": "^1.2.3",
"grunt-browser-sync": "^2.2.0",
"grunt-cache-breaker": "^2.0.1",
"grunt-check-dependencies": "^0.12.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",

View File

@ -120,6 +120,16 @@ module.exports = function (grunt) {
build: false
}
}
},
cachebreaker: {
default: {
options: {
match: ['app.js']
},
files: {
src: ['build/index.html']
}
}
}
});
@ -129,4 +139,5 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-postcss");
grunt.loadNpmTasks("grunt-inline");
grunt.loadNpmTasks("grunt-cache-breaker");
};