* Update docs to handle kibana-extra * Add info about plugin directory structure to docs
This commit is contained in:
parent
decde4d5d0
commit
49d2ffd038
|
@ -13,20 +13,18 @@ To get started copy and paste this example to `test/functional/config.js`:
|
|||
["source","js"]
|
||||
-----------
|
||||
import { resolve } from 'path';
|
||||
import { resolveKibanaPath } from '@elastic/plugin-helpers';
|
||||
|
||||
import { MyServiceProvider } from './services/my_service';
|
||||
import { MyAppPageProvider } from './services/my_app_page;
|
||||
|
||||
// allow overriding the default kibana directory
|
||||
// using the KIBANA_DIR environment variable
|
||||
const KIBANA_CONFIG_PATH = resolve(process.env.KIBANA_DIR || '../kibana', 'test/functional/config.js');
|
||||
|
||||
// the default export of config files must be a config provider
|
||||
// that returns an object with the projects config values
|
||||
export default async function ({ readConfigFile }) {
|
||||
|
||||
// read the Kibana config file so that we can utilize some of
|
||||
// its services and PageObjects
|
||||
const kibanaConfig = await readConfigFile(KIBANA_CONFIG_PATH);
|
||||
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
|
||||
|
||||
return {
|
||||
// list paths to the files that contain your plugins tests
|
||||
|
@ -81,7 +79,7 @@ From the root of your repo you should now be able to run the `FunctionalTestRunn
|
|||
|
||||
["source","shell"]
|
||||
-----------
|
||||
node ../kibana/scripts/functional_test_runner
|
||||
node ../../kibana/scripts/functional_test_runner
|
||||
-----------
|
||||
|
||||
[float]
|
||||
|
|
|
@ -20,7 +20,20 @@ Many Kibana developers hang out on `irc.freenode.net` in the `#kibana` channel.
|
|||
[float]
|
||||
==== Plugin Generator
|
||||
|
||||
Check out the https://github.com/elastic/generator-kibana-plugin[plugin generator] to kick-start your plugin.
|
||||
Check out the https://github.com/elastic/template-kibana-plugin/[plugin generator] to kick-start your plugin.
|
||||
|
||||
[float]
|
||||
==== Directory structure for plugins
|
||||
|
||||
The Kibana directory must be named `kibana`, and your plugin directory must be located within the sibling `kibana-extra` folder, for example:
|
||||
|
||||
["source","shell"]
|
||||
-----------
|
||||
.
|
||||
├── kibana
|
||||
├── kibana-extra/foo-plugin
|
||||
└── kibana-extra/bar-plugin
|
||||
-----------
|
||||
|
||||
[float]
|
||||
==== References in the code
|
||||
|
|
Loading…
Reference in a new issue