mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
* use es6 exports in fixtures * use es6 exports in test_utils * use es6 exports in src/ui * use es6 exports in src/utils * use es6 exports in src/server * use es6 exports in timelion * use es6 exports in core plugins, but not console * use es6 exports in console * use es6 exports in src/cli * use eslint --fix for no-extra-semi rule * selectively disable kibana-custom/no-default-export * replace define() with exports * clean up some object exports in these cases, named exports are the better replacement * use es6 exports in src/optimize, where possible * fix uses of named exports * fix some imports in console * revert postcss optimizer to module.exports * [timelion] put shared code in common directory * fix url module export don't export as default, rely on the named export * convert define modules in src to export * convert ui-bootstrap to cjs module * lint webpackShims no reason not to, they pass when the no-var rule is disabled * fix new code not using es6 exports * fix some straggling exports
24 lines
509 B
JavaScript
24 lines
509 B
JavaScript
import { execFileSync } from 'child_process';
|
|
|
|
export default function exec(cmd, args, opts) {
|
|
console.log(' >', cmd, args.join(' '));
|
|
exec.silent(cmd, args, opts);
|
|
}
|
|
|
|
exec.silent = function (cmd, args, opts) {
|
|
opts = opts || {};
|
|
if (!opts.stdio) opts.stdio = ['ignore', 1, 2];
|
|
try {
|
|
execFileSync(cmd, args, opts);
|
|
} catch (e) {
|
|
if (opts.stdio[1] !== 1) {
|
|
console.log(e.stdout + '');
|
|
}
|
|
|
|
if (opts.stdio[2] !== 2) {
|
|
console.log(e.stderr + '');
|
|
}
|
|
|
|
throw e;
|
|
}
|
|
};
|