Skip to content

Commit 0a9f705

Browse files
committed
tech(systemjs): more fixes for optmized build
1 parent dabd680 commit 0a9f705

File tree

9 files changed

+14
-15
lines changed

9 files changed

+14
-15
lines changed

public/app/boot.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
'use strict';
33

44
System.import('app/app').then(function(app) {
5-
console.log(app);
65
app.init();
76
}).catch(function(err) {
87
console.log('Loading app module failed: ', err);

public/app/core/controllers/grafana_ctrl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import $ from 'jquery';
88
import coreModule from '../core_module';
99

1010
coreModule.controller('GrafanaCtrl', function($scope, alertSrv, utilSrv, $rootScope, $controller, contextSrv) {
11-
console.log('grafana ctrl');
1211

1312
$scope.init = function() {
1413
$scope.contextSrv = contextSrv;

public/app/core/controllers/signup_ctrl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import coreModule from '../core_module';
66

77
export class SignUpCtrl {
88

9+
/** @ngInject */
910
constructor(
1011
private $scope : any,
1112
private $location : any,

public/app/features/dashboard/timepicker/timepicker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class TimePickerCtrl {
3030
isOpen: boolean;
3131
isUtc: boolean;
3232

33+
/** @ngInject */
3334
constructor(private $scope, private $rootScope, private timeSrv) {
3435
$scope.ctrl = this;
3536

public/app/grafana.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ import bootstrap = require('bootstrap');
1717
import kbn = require('app/core/utils/kbn');
1818
import config = require('app/core/config');
1919

20-
// import {Component} from 'angular2/core';
21-
// console.log(Component);
22-
2320
export class GrafanaApp {
2421
registerFunctions: any;
2522
ngModuleDependencies: any[];
@@ -46,7 +43,6 @@ export class GrafanaApp {
4643
app.constant('grafanaVersion', "@grafanaVersion@");
4744

4845
app.config(($locationProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) => {
49-
console.log('app config');
5046
this.registerFunctions.controller = $controllerProvider.register;
5147
this.registerFunctions.directive = $compileProvider.directive;
5248
this.registerFunctions.factory = $provide.factory;

public/app/system.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ System.config({
3434
vendor: {
3535
defaultExtension: 'js',
3636
},
37+
test: {
38+
defaultExtension: 'js',
39+
},
3740
},
3841

3942
map: {

tasks/build_task.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ module.exports = function(grunt) {
1919
'ngAnnotate:build',
2020
'systemjs:build',
2121
'concat:js',
22-
// 'filerev',
23-
// 'remapFilerev',
22+
'filerev',
23+
'remapFilerev',
2424
'usemin',
25-
// 'uglify:genDir'
25+
'uglify:genDir'
2626
]);
2727

2828
// task to add [[.AppSubUrl]] to reved path

tasks/options/filerev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function(config) {
1414
dest: '<%= genDir %>/css'
1515
},
1616
js: {
17-
src: '<%= genDir %>/app/app.js',
17+
src: '<%= genDir %>/app/boot.js',
1818
dest: '<%= genDir %>/app'
1919
}
2020
};

tasks/systemjs_task.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ module.exports = function(grunt) {
1313
var modules = [
1414
'app/app',
1515
'app/features/all',
16-
'app/plugins/panels/**/*',
17-
'app/plugins/datasource/graphite/**/*',
18-
'app/plugins/datasource/influxdb/**/*',
19-
'app/plugins/datasource/elasticsearch/**/*',
16+
'app/plugins/panels/**/module',
17+
'app/plugins/datasource/graphite/datasource',
18+
'app/plugins/datasource/influxdb/datasource',
19+
'app/plugins/datasource/elasticsearch/datasource',
2020
];
2121

2222
var expression = modules.join(' + ');
@@ -31,7 +31,7 @@ module.exports = function(grunt) {
3131
.catch(function(err) {
3232
console.log('Build error');
3333
console.log(err);
34-
done();
34+
done(false);
3535
});
3636
});
3737
};

0 commit comments

Comments
 (0)