kibana/packages
2018-02-21 13:54:27 +01:00
..
eslint-config-kibana [eslint-config-kibana] remove stub test command (#16625) 2018-02-09 15:36:21 -07:00
eslint-plugin-kibana-custom Build multiple Kibana packages for production (#16313) 2018-02-02 20:49:57 +01:00
kbn-babel-preset Babel preset package (#16479) 2018-02-03 12:24:16 -07:00
kbn-datemath Production package example: datemath (#16531) 2018-02-13 21:49:55 +01:00
kbn-plugin-generator Missing argument for generate_plugin script (#16782) 2018-02-19 10:08:13 +01:00
kbn-plugin-helpers [plugin-helpers] allow opt-ing out of dependency installation (#16816) 2018-02-20 16:28:22 -07:00
kbn-pm [kbn-pm] Enable intermediate build directory for projects (#16839) 2018-02-21 13:54:27 +01:00
kbn-test-subj-selector Add test-subj-selector module to packages dir. (#16623) 2018-02-13 10:34:47 -08:00
README.md [kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07:00

Kibana-related packages

This folder contains packages that are intended for use in Kibana and Kibana plugins.

tl;dr:

  • Don't publish to npm registry
  • Always use the @kbn namespace
  • Always set "private": true in package.json

Using these packages

We no longer publish these packages to the npm registry. Now, instead of specifying a version when including these packages, we rely on link: dependencies in Yarn, which sets up a symlink to the package.

For example if you want to use the @kbn/datemath package in Kibana itself, you can specify the dependency like this:

"@kbn/datemath": "link:packages/kbn-datemath"

However, if you want to use this from a Kibana plugin, you need to account for the relative location of the Kibana repo, so it would instead be:

"@kbn/datemath": "link:../../kibana/packages/kbn-datemath"

How all of this works is described in more detail in the @kbn/pm docs.

Creating a new package

Create a new sub-folder. The name of the folder should mirror the name in the package's package.json. E.g. if the name is @kbn/datemath the folder name should be kbn-datemath.

All new packages should use the @kbn namespace, and should be marked with "private": true.