mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
Added helpers, KIBANA_ROOT environment override (elastic/kibana-plugin-helpers#41)
* run is now a named export, added helpers for interacting with the kibana repo * [config] override the kibana root config with KIBANA_ROOT envvar Original commit: elastic/kibana-plugin-helpers@54a38cd9a2
This commit is contained in:
parent
0dfc60ded1
commit
7331033072
4 changed files with 44 additions and 1 deletions
28
packages/kbn-plugin-helpers/lib/utils.js
Normal file
28
packages/kbn-plugin-helpers/lib/utils.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
var resolve = require('path').resolve;
|
||||
|
||||
var pluginConfig = require('./config_file');
|
||||
|
||||
function babelRegister() {
|
||||
var plugin = pluginConfig();
|
||||
require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register'));
|
||||
}
|
||||
|
||||
function resolveKibanaPath(path) {
|
||||
var plugin = pluginConfig();
|
||||
return resolve(plugin.kibanaRoot, path);
|
||||
}
|
||||
|
||||
function createToolingLog(level) {
|
||||
return require(resolveKibanaPath('src/utils')).createToolingLog(level);
|
||||
}
|
||||
|
||||
function readFtrConfigFile(log, path, settingOverrides) {
|
||||
return require(resolveKibanaPath('src/functional_test_runner')).readConfigFile(log, path, settingOverrides);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
babelRegister: babelRegister,
|
||||
resolveKibanaPath: resolveKibanaPath,
|
||||
createToolingLog: createToolingLog,
|
||||
readFtrConfigFile: readFtrConfigFile,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue