mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Feat: add includePlugins setting (elastic/kibana-plugin-helpers#49)
* observe includePlugins setting * fix: move resolve up to config parser this ensures that the path is resolved relative to the plugin root Original commit: elastic/kibana-plugin-helpers@fd07d617a4
This commit is contained in:
parent
607354978f
commit
b73576b4d5
2 changed files with 12 additions and 2 deletions
|
@ -24,8 +24,12 @@ module.exports = function (root) {
|
|||
}
|
||||
});
|
||||
|
||||
// if the kibanaRoot is set, use resolve to ensure correct resolution
|
||||
if (config.kibanaRoot) config.kibanaRoot = resolve(root, config.kibanaRoot);
|
||||
// use resolve to ensure correct resolution of paths
|
||||
const { kibanaRoot, includePlugins } = config;
|
||||
if (kibanaRoot) config.kibanaRoot = resolve(root, kibanaRoot);
|
||||
if (includePlugins) config.includePlugins = includePlugins.map(path => resolve(root, path));
|
||||
|
||||
// allow env setting to override kibana root from config
|
||||
if (KIBANA_ROOT_OVERRIDE) config.kibanaRoot = KIBANA_ROOT_OVERRIDE;
|
||||
|
||||
return config;
|
||||
|
|
|
@ -6,6 +6,12 @@ module.exports = function (plugin, run, options) {
|
|||
const cmd = (process.platform === 'win32') ? 'bin\\kibana.bat' : 'bin/kibana';
|
||||
let args = ['--dev', '--plugin-path', plugin.root];
|
||||
|
||||
if (Array.isArray(plugin.includePlugins)) {
|
||||
plugin.includePlugins.forEach((path) => {
|
||||
args = args.concat(['--plugin-path', path]);
|
||||
});
|
||||
}
|
||||
|
||||
if (options.flags) {
|
||||
args = args.concat(options.flags);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue