mirror of
https://github.com/elastic/kibana.git
synced 2025-04-26 02:37:44 -04:00
* Initial conversion to asciidoc * Update and split migration guide * Convert MIGRATION_EXAMPLES to asciidoc * build with --focus flag * convert migration guide to asciidoc * cleanup migration_examples * fix wrong Heading size * update links in docs * Apply suggestions from code review Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> * Apply suggestions from code review Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> * add tooling section * explain purpose of each lifecycle method * cleanup docs * cleanup p2 * fix wrong link * resturcture core docs * fix wrong link * update missing links * Apply suggestions from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * address comments * add a commenta about plugin-helpers preconfigured * improve density of tables * fix lik * remove links to the migration guide * address comments * Apply suggestions from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * address @gchaps comments * Apply suggestions from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * change format of ES client change list Co-authored-by: Josh Dover <me@joshdover.com> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
62 lines
2.9 KiB
Text
62 lines
2.9 KiB
Text
[[development-plugin-resources]]
|
|
== Plugin Resources
|
|
|
|
Here are some resources that are helpful for getting started with plugin development.
|
|
|
|
[discrete]
|
|
=== Some light reading
|
|
If you haven't already, start with <<development-getting-started>>. If you are planning to add your plugin to the {kib} repo, read the <<contributing>> guide, if you are building a plugin externally, read <<external-plugin-development>>. In both cases, read up on our recommended <<development-best-practices>>.
|
|
|
|
[discrete]
|
|
=== Creating an empty plugin
|
|
|
|
You can use the <<automatic-plugin-generator>> to get a basic structure for a new plugin. Plugins that are not part of the
|
|
{kib} repo should be developed inside the `plugins` folder. If you are building a new plugin to check in to the {kib} repo,
|
|
you will choose between a few locations:
|
|
|
|
- {kib-repo}tree/{branch}/x-pack/plugins[x-pack/plugins] for commercially licensed plugins
|
|
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for open source licensed plugins
|
|
- {kib-repo}tree/{branch}/examples[examples] for developer example plugins (these will not be included in the distributables)
|
|
|
|
[discrete]
|
|
=== Elastic UI Framework
|
|
If you're developing a plugin that has a user interface, take a look at our https://elastic.github.io/eui[Elastic UI Framework].
|
|
It documents the CSS and React components we use to build {kib}'s user interface.
|
|
|
|
You're welcome to use these components, but be aware that they are rapidly evolving, and we might introduce breaking changes that will disrupt your plugin's UI.
|
|
|
|
[discrete]
|
|
=== TypeScript Support
|
|
We recommend your plugin code is written in http://www.typescriptlang.org/[TypeScript].
|
|
To enable TypeScript support, create a `tsconfig.json` file at the root of your plugin that looks something like this:
|
|
|
|
["source","js"]
|
|
-----------
|
|
{
|
|
// extend Kibana's tsconfig, or use your own settings
|
|
"extends": "../../kibana/tsconfig.json",
|
|
|
|
// tell the TypeScript compiler where to find your source files
|
|
"include": [
|
|
"server/**/*",
|
|
"public/**/*"
|
|
]
|
|
}
|
|
-----------
|
|
|
|
TypeScript code is automatically converted into JavaScript during development,
|
|
but not in the distributable version of {kib}. If you use the
|
|
{kib-repo}blob/{branch}/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin, then your `.ts` and `.tsx` files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of {kib}.
|
|
|
|
[discrete]
|
|
=== {kib} platform migration guide
|
|
|
|
<<migrating-legacy-plugins, This guide>>
|
|
provides an action plan for moving a legacy plugin to the new platform.
|
|
<<migrating-legacy-plugins-examples, Provides>> migration examples for the legacy core services.
|
|
|
|
[discrete]
|
|
=== Externally developed plugins
|
|
|
|
If you are building a plugin outside of the {kib} repo, read <<external-plugin-development>>.
|
|
|