worked on css and js asset reving, and angular partial precaching, still need to fix panel module.html, issue #418

This commit is contained in:
Torkel Ödegaard
2014-06-01 16:57:59 +02:00
parent d499f4e0d0
commit f799ded434
9 changed files with 41 additions and 13 deletions
+3 -1
View File
@@ -9,11 +9,13 @@ module.exports = function(grunt) {
'concat:css',
'copy:everything_but_less_to_temp',
'htmlmin:build',
'ngtemplates:app',
'ngtemplates',
'cssmin:build',
'ngmin:build',
'requirejs:build',
'concat:js',
'filerev',
'usemin',
'clean:temp',
'build:write_revision',
'uglify:dest'
+8
View File
@@ -10,5 +10,13 @@ module.exports = function(config) {
],
dest: '<%= srcDir %>/css/default.min.css'
},
js: {
src: [
'<%= destDir %>/vendor/require/require.js',
'<%= destDir %>/app/components/require.config.js',
'<%= destDir %>/app/app.js',
],
dest: '<%= destDir %>/app/app.js'
},
};
};
+5 -1
View File
@@ -6,8 +6,12 @@ module.exports = function(config) {
length: 8,
},
css: {
src: '<%= srcDir %>/css/default.min.css',
src: '<%= destDir %>/css/default.min.css',
dest: '<%= destDir %>/css'
},
js: {
src: '<%= destDir %>/app/app.js',
dest: '<%= destDir %>/app'
}
};
};
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = function(config) {
expand: true,
cwd: '<%= tempDir %>',
src: [
'index.html',
//'index.html',
'app/panels/**/*.html',
'app/partials/**/*.html'
],
+11 -2
View File
@@ -1,9 +1,18 @@
module.exports = function(config) {
return {
kibana: {
grafana: {
cwd: '<%= tempDir %>',
src: 'app/**/*.html',
src: 'app/partials/**/*.html',
dest: '<%= tempDir %>/app/components/partials.js',
options: {
bootstrap: function(module, script) {
return "define('components/partials', ['angular'], function(angular) { \n" +
"angular.module('kibana').run(['$templateCache', function($templateCache) { \n" +
script +
'\n}]);' +
'\n});';
}
}
}
};
};
+6 -2
View File
@@ -60,7 +60,10 @@ module.exports = function(config,grunt) {
'directives/all',
'jquery.flot.pie',
'angular-sanitize',
'angular-dragdrop'
'angular-dragdrop',
'panels/graphite/module',
'panels/text/module',
'panels/timepicker/module'
]
}
];
@@ -75,7 +78,8 @@ module.exports = function(config,grunt) {
requireModules.push({
name: 'panels/'+panelName+'/'+subName+'/module',
exclude: ['app']
}); })
});
})
} else {
requireModules.push({
name: 'panels/'+panelName+'/module',
-3
View File
@@ -1,8 +1,5 @@
module.exports = function(config) {
return {
html: '<%= destDir %>/index.html',
options: {
assetsDirs: ['<%= destDir %>/css/']
}
};
};