Commit b1f17d1e by Rashid Khan

Merge pull request #499 from rashidkpc/master

Spencers cache busting tweaks, fix for map panel path
parents 7b284831 25344632
......@@ -102,21 +102,21 @@ module.exports = function (grunt) {
options: {
appDir: '<%= tempDir %>',
dir: '<%= destDir %>',
modules: [], // populated below
mainConfigFile: '<%= tempDir %>/app/components/require.config.js',
keepBuildDir: true,
modules: [], // populated below
optimize: 'none',
optimizeCss: 'none',
removeCombined: true,
preserveLicenseComments: false,
findNestedDependencies: true,
normalizeDirDefines: "none",
inlineText: true,
skipPragmas: true,
optimizeAllPluginResources: false,
removeCombined: true,
fileExclusionRegExp: /^\./,
logLevel: 0,
skipSemiColonInsertion: true,
done: function (done, output) {
var duplicates = require('rjs-build-analysis').duplicates(output);
......@@ -127,11 +127,6 @@ module.exports = function (grunt) {
}
done();
},
config: {
'tmpl': {
registerTemplate: function () {}
}
}
}
}
......@@ -146,9 +141,14 @@ module.exports = function (grunt) {
quite: true,
compress: true,
preserveComments: false,
banner: '<%= meta.banner %>',
banner: '<%= meta.banner %>'
}
}
},
'git-describe': {
me: {
// Target-specific file lists and/or options go here.
},
}
};
......@@ -201,10 +201,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-ngmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-git-describe');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-requirejs');
......@@ -223,7 +225,28 @@ module.exports = function (grunt) {
'ngmin',
'requirejs:compile_temp',
'clean:after_require',
'write_revision_to_dest', // runs git-describe and replace:config
'uglify:dest'
]);
grunt.registerTask('write_revision_to_dest', function() {
grunt.event.once('git-describe', function (desc) {
grunt.config('string-replace.config', {
src: '<%= destDir %>/app/components/require.config.js',
dest: '<%= destDir %>/app/components/require.config.js',
options: {
replacements: [
{
pattern: /(?:^|\/\/)(.*)@REV@/,
replacement: '$1'+desc.object
}
]
}
});
grunt.task.run('string-replace:config');
});
grunt.task.run('git-describe');
});
};
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
require.config({baseUrl:"app",paths:{config:"../config",settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"../vendor/jquery/jquery-1.8.0","extend-jquery":"components/extend-jquery","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},jquery:{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
\ No newline at end of file
require.config({baseUrl:"app",urlArgs:"r=ab93bce",paths:{config:"../config",settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"../vendor/jquery/jquery-1.8.0","extend-jquery":"components/extend-jquery","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},jquery:{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
\ No newline at end of file
......@@ -19,7 +19,9 @@
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.4",
"rjs-build-analysis": "0.0.3",
"grunt-angular-templates": "~0.3.12"
"grunt-angular-templates": "~0.3.12",
"grunt-string-replace": "~0.2.4",
"grunt-git-describe": "~2.3.2"
},
"license": "Apache License"
}
......@@ -3,6 +3,7 @@
*/
require.config({
baseUrl: 'app',
// urlArgs: 'r=@REV@',
paths: {
config: '../config',
settings: 'components/settings',
......@@ -38,12 +39,10 @@ require.config({
},
shim: {
underscore: {
// requiring should work, but isn't required
exports: '_'
},
angular: {
// requiring should work, but isn't required
deps: ['jquery'],
exports: 'angular'
},
......@@ -60,7 +59,7 @@ require.config({
exports: 'jQuery'
},
// simple dependency declatation
// simple dependency declaration
'jquery.flot': ['jquery'],
'jquery.flot.pie': ['jquery', 'jquery.flot'],
'jquery.flot.selection':['jquery', 'jquery.flot'],
......
......@@ -145,7 +145,7 @@ function (angular, app, _, $, config) {
function render_panel() {
elem.text('');
$('.jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label').remove();
require(['./lib/map.'+scope.panel.map], function () {
require(['./panels/map/lib/map.'+scope.panel.map], function () {
elem.vectorMap({
map: scope.panel.map,
regionStyle: {initial: {fill: '#8c8c8c'}},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment