Skip to content

Commit

Permalink
Issue #60: Add cache buster to generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
stil4m committed Mar 20, 2017
1 parent a7ba83f commit 8f1c838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ gulp.task('lint', () => {
gulp.task('html', () => {
const packageVersion = require('./package.json').version;
gulp.src('html/index.html')
.pipe(gulpReplace(/\{\{VERSION\}\}/, 'v' + packageVersion))
.pipe(gulpReplace(/\{\{VERSION\}\}/g, 'v' + packageVersion))
.pipe(gulp.dest('js/public/'));
});

Expand Down
4 changes: 2 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>Elm Analyse {{VERSION}}</title>
<script src="/client-elm.js" charset="utf-8"></script>
<script src="/client-elm.js?cache_buster={{VERSION}}" charset="utf-8"></script>
<link rel="stylesheet" href="/bootstrap/start-bootstrap-admin-2_v3.3.7.css" />
<link href="/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<style>
Expand Down Expand Up @@ -53,5 +53,5 @@
var el = document.getElementById('app');
var app = Elm.Client.Main.embed(el);
</script>
<script src="graph.js"></script>
<script src="graph.js?cache_buster={{VERSION}}"></script>
</html>

0 comments on commit 8f1c838

Please sign in to comment.