mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Added marvel specific tasks for setup
This commit is contained in:
parent
e8d20fe781
commit
161c1d1de9
7 changed files with 28 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,3 +12,4 @@
|
|||
/lib
|
||||
/kibana
|
||||
/node_modules
|
||||
/dist
|
||||
|
|
|
@ -20,7 +20,8 @@ module.exports = function (grunt) {
|
|||
function loadConfig(config,path) {
|
||||
require('glob').sync('*', {cwd: path}).forEach(function(option) {
|
||||
var key = option.replace(/\.js$/,'');
|
||||
// If key already exists, extend it. It is your responsibility to avoid naming collisions
|
||||
// Merge duplicate plugin configs. It is your responsibility to avoid naming collisions
|
||||
// in tasks
|
||||
config[key] = config[key] || {};
|
||||
grunt.util._.extend(config[key], require(path + option)(config));
|
||||
});
|
||||
|
@ -31,9 +32,9 @@ module.exports = function (grunt) {
|
|||
// Merge that object with what with whatever we have here
|
||||
loadConfig(config,'./tasks/options/');
|
||||
|
||||
if (grunt.file.exists('kibana')) {
|
||||
grunt.loadTasks('kibana/tasks');
|
||||
loadConfig(config,'./kibana/tasks/options/');
|
||||
if (grunt.file.exists(config.baseDir)) {
|
||||
grunt.loadTasks(config.baseDir+'/tasks');
|
||||
loadConfig(config,config.baseDir+'/tasks/options/');
|
||||
}
|
||||
|
||||
// pass the config to grunt
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"grunt-git": "~0.1.6",
|
||||
"grunt-s3": "~0.2.0-alpha.2",
|
||||
"grunt-ngmin": "0.0.3",
|
||||
"grunt-contrib": "~0.8.0",
|
||||
"grunt-contrib-less": "~0.7.0",
|
||||
"grunt-git-describe": "~2.3.2",
|
||||
"grunt-contrib-cssmin": "~0.6.1",
|
||||
|
@ -30,7 +29,8 @@
|
|||
"grunt-angular-templates": "~0.3.12",
|
||||
"grunt-contrib-uglify": "~0.2.4",
|
||||
"load-grunt-tasks": "~0.2.0",
|
||||
"glob": "~3.2.7"
|
||||
"glob": "~3.2.7",
|
||||
"grunt-contrib-symlink": "~0.2.0"
|
||||
},
|
||||
"license": "Apache License"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@ module.exports = function(config) {
|
|||
return {
|
||||
on_start: ['<%= destDir %>', '<%= tempDir %>'],
|
||||
temp: ['<%= tempDir %>'],
|
||||
setup: ['<%= kibanaDir %>']
|
||||
setup: ['<%= baseDir %>']
|
||||
};
|
||||
};
|
|
@ -4,7 +4,7 @@ module.exports = function(config) {
|
|||
marvel_config: {
|
||||
cwd: '.',
|
||||
src: ['config.js'],
|
||||
dest: '<%= kibanaDir %>/src/'
|
||||
dest: '<%= baseDir %>/src/'
|
||||
}
|
||||
};
|
||||
};
|
16
tasks/options/symlink.js
Normal file
16
tasks/options/symlink.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
module.exports = function(config) {
|
||||
return {
|
||||
explicit: {
|
||||
files: [
|
||||
{
|
||||
src: 'panels',
|
||||
dest: '<%= baseDir %>/src/app/panels/marvel'
|
||||
},
|
||||
{
|
||||
src: 'dashboards',
|
||||
dest: '<%= baseDir %>/src/app/dashboards/marvel'
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
};
|
|
@ -2,6 +2,7 @@ module.exports = function(grunt) {
|
|||
grunt.registerTask('setup', [
|
||||
'clean:setup',
|
||||
'gitclone:kibana',
|
||||
'copy:marvel_config'
|
||||
'copy:marvel_config',
|
||||
'symlink'
|
||||
]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue