Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Add support for passing in node options via environment variable (ela…
Browse files Browse the repository at this point in the history
…stic#56)

* Add support for passing in node options via environment variable

* Split node options

* semicolon
  • Loading branch information
jbudz authored and spalger committed Feb 8, 2018
1 parent c65277c commit 7988699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/kbn-plugin-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"lint": "eslint bin/ help/ tasks/"
},
"dependencies": {
"argv-split": "^2.0.1",
"commander": "^2.9.0",
"del": "^2.2.2",
"gulp-rename": "1.2.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-plugin-helpers/tasks/start/start_action.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
const execFileSync = require('child_process').execFileSync;
const { join } = require('path');
const split = require('argv-split');

module.exports = function (plugin, run, options) {
options = options || {};

const cmd = 'node';
const script = join('scripts', 'kibana.js');
let args = [script, '--dev', '--plugin-path', plugin.root];
const nodeOptions = split(process.env.NODE_OPTIONS || '');

let args = nodeOptions.concat([script, '--dev', '--plugin-path', plugin.root]);

if (Array.isArray(plugin.includePlugins)) {
plugin.includePlugins.forEach((path) => {
Expand Down

0 comments on commit 7988699

Please sign in to comment.