* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.
* chore(NA): patch babel register to load typescrit
* chore(NA): first working version with babel 7 replacing typescript compiler.
* fix(NA): common preset declaration in order to make it work with babel-loader.
* chore(na): organizing babel preset env package json.
* chore(NA): mocha tests enabled.
* fix(NA): typo on importing
* test(NA): majority of x-pack tests ported to use babel-jest
* fix(NA): report info button test with babel-jest.
* fix(NA): polling service tests.
* test(na): fix server plugins plugin tests.
* test(NA): batch of test fixs for jest tests under babel-jest hoisting.
* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.
* chore(NA): update yarn.lock file.
* chore(NA): tests passing.
* chore(NA): remove wrong dep
* chore(NA): fix tsconfig
* chore(NA): skip babel for ts-jest.
* chore(NA): selectively apply the plugin to strip off namespace from ts files.
* chore(NA): remove not needed changes from ts tests
* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.
* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.
* chore(NA): merge and solve conflicts with master.
* chore(NA): fix problems reported by eslint
* chore(NA): fix license ovveride for babel-plugin-mock-imports
* chore(NA): update jest integration tests for kbn pm
* chore(NA): update babel jest integration tests for kbn pm.
* test(NA): update jest integration snapshot for kbn pm.
* chore(NA): apply changes according to the pull request reviews.
* chore(NA): apply changes according to the pull request reviews.
* refact(NA): migrate jest tests to the new pattern.
* fix(NA): babel 7 polyfill in the tests bundle.
* chore(NA): restore needed step in order to compile x-pack with typescript.
* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7
* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"
This reverts commit
|
||
---|---|---|
.. | ||
sao_template | ||
index.js | ||
package.json | ||
README.md |
Kibana Plugin Generator
This package can be used to generate a Kibana plugin from the Kibana repo.
Setup
Before you can use this plugin generator you must setup your Kibana development environment. If you can successfully run yarn kbn bootstrap
then you are ready to generate plugins!
Compatibility
The plugin generator became a part of the Kibana project as of Kibana 6.3. If you are targeting versions before Kibana 6.3 then use the Kibana plugin sao template.
If you are targeting Kibana 6.3 or greater then checkout the corresponding Kibana branch and run the plugin generator.
Quick Start
To target the current development version of Kibana just use the default master
branch.
node scripts/generate_plugin my_plugin_name
# generates a plugin in `plugins/my_plugin_name`
To target 6.3, use the 6.x
branch (until the 6.3
branch is created).
git checkout 6.x
yarn kbn bootstrap # always bootstrap when switching branches
node scripts/generate_plugin my_plugin_name
# generates a plugin for Kibana 6.3 in `../kibana-extra/my_plugin_name`
The generate script supports a few flags; run it with the --help
flag to learn more.
node scripts/generate_plugin --help
Updating
Since the Plugin Generator is now a part of the Kibana repo, when you update your local checkout of the Kibana repository and bootstrap
everything should be up to date!
NOTE: These commands should be run from the Kibana repo, and
upstream
is our convention for the git remote that references https://github.com/elastic/kibana.git, unless you added this remote you might need to useorigin
.
git pull upstream master
yarn kbn bootstrap
Plugin Development Scripts
Generated plugins receive a handful of scripts that can be used during development. Those scripts are detailed in the README.md file in each newly generated plugin, and expose the scripts provided by the Kibana plugin helpers, but here is a quick reference in case you need it:
NOTE: All of these scripts should be run from the generated plugin.
-
yarn kbn bootstrap
Install dependencies and crosslink Kibana and all projects/plugins.
IMPORTANT: Use this script instead of
yarn
to install dependencies when switching branches, and re-run it whenever your dependencies change. -
yarn start
Start kibana and have it include this plugin. You can pass any arguments that you would normally send to
bin/kibana
yarn start --elasticsearch.hosts http://localhost:9220
-
yarn build
Build a distributable archive of your plugin.
-
yarn test:browser
Run the browser tests in a real web browser.
-
yarn test:server
Run the server tests using mocha.
For more information about any of these commands run yarn ${task} --help
. For a full list of tasks run yarn run
or take a look in the package.json
file.