mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 07:02:22 +08:00
tech(systemjs): worked on making optimized builds work with systemjs builder
This commit is contained in:
@ -2,7 +2,6 @@ module.exports = function(grunt) {
|
||||
"use strict";
|
||||
|
||||
grunt.registerTask('systemjs:build', function() {
|
||||
var path = require("path");
|
||||
var Builder = require('systemjs-builder');
|
||||
var done = this.async();
|
||||
|
||||
@ -11,11 +10,23 @@ module.exports = function(grunt) {
|
||||
var builder = new Builder('public_gen', 'public_gen/app/systemjs.conf.js');
|
||||
console.log('Starting systemjs-builder');
|
||||
|
||||
var modules = [
|
||||
'app/app',
|
||||
'app/features/all',
|
||||
'app/plugins/panels/**/*',
|
||||
'app/plugins/datasource/graphite/**/*',
|
||||
'app/plugins/datasource/influxdb/**/*',
|
||||
'app/plugins/datasource/elasticsearch/**/*',
|
||||
];
|
||||
|
||||
var expression = modules.join(' + ');
|
||||
|
||||
builder
|
||||
.bundle('app/app + app/features/all', 'public_gen/app/app.js')
|
||||
.bundle(expression, 'public_gen/app/app_bundle.js')
|
||||
.then(function() {
|
||||
console.log('Build complete');
|
||||
done();
|
||||
grunt.task.run('concat:bundle_and_boot');
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.log('Build error');
|
||||
@ -23,5 +34,4 @@ module.exports = function(grunt) {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user