Deprecate specifying kibana root location (elastic/kibana-plugin-helpers#59)

Original commit: elastic/kibana-plugin-helpers@385fdede72
This commit is contained in:
Kim Joar Bekkelund 2017-12-12 13:11:27 +01:00 committed by GitHub
parent 4f24ea931b
commit eec07c5209
2 changed files with 24 additions and 1 deletions

View file

@ -48,7 +48,16 @@ All configuration setting listed below can simply can be included in the json co
Setting | Description
------- | -----------
`kibanaRoot` | Path to your checkout of Kibana, relative paths are ok
`kibanaRoot` | DEPRECATED. Path to your checkout of Kibana, relative paths are ok.
In the next major version of the plugin helpers the `kibanaRoot` setting can no longer be specified, and plugins must be located within the sibling `kibana-extra` folder, for example:
```sh
.
├── kibana
├── kibana-extra/foo-plugin
└── kibana-extra/bar-plugin
```
### Settings for `start`

View file

@ -24,6 +24,20 @@ module.exports = function (root) {
}
});
const deprecationMsg = 'has been deprecated and is removed in the next ' +
'major version of `@elastic/plugin-helpers`.\n'
if (config.kibanaRoot) {
process.stdout.write(
'WARNING: The `kibanaRoot` config option ' + deprecationMsg
);
}
if (process.env.KIBANA_ROOT) {
process.stdout.write(
'WARNING: The `KIBANA_ROOT` environment variable ' + deprecationMsg
);
}
// use resolve to ensure correct resolution of paths
const { kibanaRoot, includePlugins } = config;
if (kibanaRoot) config.kibanaRoot = resolve(root, kibanaRoot);