fix(build): fixed requirejs optimized build

This commit is contained in:
Torkel Ödegaard 2015-09-21 09:36:17 +02:00
parent 7f1af24318
commit 20f04ab352

View File

@ -7,7 +7,7 @@ module.exports = function(config,grunt) {
appDir: '<%= genDir %>', appDir: '<%= genDir %>',
dir: '<%= tempDir %>', dir: '<%= tempDir %>',
mainConfigFile: '<%= genDir %>/app/components/require.config.js', mainConfigFile: '<%= genDir %>/app/components/require.config.js',
baseUrl: 'app', baseUrl: './',
waitSeconds: 0, waitSeconds: 0,
modules: [], // populated below, modules: [], // populated below,
@ -39,7 +39,7 @@ module.exports = function(config,grunt) {
var requireModules = options.modules = [ var requireModules = options.modules = [
{ {
// main/common module // main/common module
name: 'app', name: 'app/app',
include: [ include: [
'kbn', 'kbn',
'text', 'text',
@ -54,21 +54,17 @@ module.exports = function(config,grunt) {
'jquery.flot', 'jquery.flot',
'angular-strap', 'angular-strap',
'angular-dragdrop', 'angular-dragdrop',
'core/core', 'app/core/core',
'services/all', 'app/services/all',
'features/all', 'app/features/all',
'controllers/all', 'app/controllers/all',
'components/partials', 'app/components/partials',
// bundle the datasources // bundle the datasources
'plugins/datasource/grafana/datasource', 'app/plugins/datasource/grafana/datasource',
'plugins/datasource/graphite/datasource', 'app/plugins/datasource/graphite/datasource',
'plugins/datasource/influxdb_08/datasource', 'app/plugins/datasource/influxdb/datasource',
] ]
}, },
// {
// name: 'features/org/all',
// exclude: ['app'],
// }
]; ];
var fs = require('fs'); var fs = require('fs');
@ -76,7 +72,7 @@ module.exports = function(config,grunt) {
// create a module for each directory in public/app/panels/ // create a module for each directory in public/app/panels/
fs.readdirSync(panelPath).forEach(function (panelName) { fs.readdirSync(panelPath).forEach(function (panelName) {
requireModules[0].include.push('panels/'+panelName+'/module'); requireModules[0].include.push('app/panels/'+panelName+'/module');
}); });
return { options: options }; return { options: options };