Skip to content

Commit dad3945

Browse files
committed
fix(build): fixed minor issue in systemjs builder, and added SystemJs cache buster
1 parent 1c50eb3 commit dad3945

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
"globals": {
3030
"System": true,
31+
"Promise": true,
3132
"define": true,
3233
"require": true,
3334
"Chromath": false,

public/app/boot.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
(function bootGrafana() {
22
'use strict';
33

4+
var systemLocate = System.locate;
5+
System.locate = function(load) {
6+
var System = this;
7+
return Promise.resolve(systemLocate.call(this, load)).then(function(address) {
8+
return address + System.cacheBust;
9+
});
10+
};
11+
System.cacheBust = '?bust=' + Date.now();
12+
413
System.import('app/app').then(function(app) {
514
app.default.init();
615
}).catch(function(err) {

tasks/systemjs_task.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ module.exports = function(grunt) {
1414
'app/app',
1515
'app/features/all',
1616
'app/plugins/panel/**/module',
17-
'app/plugins/datasource/graphite/datasource',
18-
'app/plugins/datasource/influxdb/datasource',
19-
'app/plugins/datasource/elasticsearch/datasource',
17+
'app/plugins/datasource/graphite/module',
18+
'app/plugins/datasource/influxdb/module',
19+
'app/plugins/datasource/elasticsearch/module',
2020
];
2121

2222
var expression = modules.join(' + ');

0 commit comments

Comments
 (0)