Use scripts/kibana instead of bin if available (elastic/kibana-plugin-helpers#53)

* Use scripts/kibana instead of bin if available

* semicolons

* Don't fallback to legacy bin/kibana start method

* chore: add 8.x version to compat chart

Original commit: elastic/kibana-plugin-helpers@fc72de53bd
This commit is contained in:
Jonathan Budzenski 2017-11-20 13:58:15 -06:00 committed by Joe Fleming
parent 5a9eed6765
commit 05de884f5d
2 changed files with 7 additions and 4 deletions

View file

@ -31,8 +31,9 @@ $ plugin-helpers help
Plugin Helpers | Kibana
-------------- | ------
7.x | 4.6+ (node 6+ only)
6.x | 4.6+
8.x | 7.0+
7.x | 4.6.x to 6.x (node 6+ only)
6.x | 4.6.x to 6.x
5.x | 4.x
## Configuration

View file

@ -1,10 +1,12 @@
const execFileSync = require('child_process').execFileSync;
const { join } = require('path');
module.exports = function (plugin, run, options) {
options = options || {};
const cmd = (process.platform === 'win32') ? 'bin\\kibana.bat' : 'bin/kibana';
let args = ['--dev', '--plugin-path', plugin.root];
const cmd = 'node';
const script = join('scripts', 'kibana.js');
let args = [script, '--dev', '--plugin-path', plugin.root];
if (Array.isArray(plugin.includePlugins)) {
plugin.includePlugins.forEach((path) => {