mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[build] Remove gulp (#138179)
* [build] Remove gulp * remove more helpers
This commit is contained in:
parent
aa1ce834a6
commit
f967dcf62a
11 changed files with 21 additions and 691 deletions
|
@ -1174,7 +1174,6 @@
|
|||
"file-loader": "^4.2.0",
|
||||
"form-data": "^4.0.0",
|
||||
"geckodriver": "^3.0.2",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-babel": "^8.0.0",
|
||||
"gulp-brotli": "^3.0.0",
|
||||
"gulp-gzip": "^1.4.2",
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
|
||||
const { downloadChromium } = require('./tasks/download_chromium');
|
||||
|
||||
// export the tasks that are runnable from the CLI
|
||||
module.exports = {
|
||||
downloadChromium,
|
||||
};
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
const { resolve } = require('path');
|
||||
|
||||
exports.runGulpTask = function (name) {
|
||||
process.chdir(resolve(__dirname, '../../..'));
|
||||
process.argv.splice(1, 1, require.resolve('gulp/bin/gulp'), name);
|
||||
require('gulp/bin/gulp');
|
||||
};
|
||||
|
||||
exports.runKibanaScript = function (name, args = []) {
|
||||
process.chdir(resolve(__dirname, '../../../..'));
|
||||
process.argv.splice(2, 0, ...args);
|
||||
require('../../../../scripts/' + name); // eslint-disable-line import/no-dynamic-require
|
||||
};
|
||||
|
||||
exports.runXPackScript = function (name, args = []) {
|
||||
process.chdir(resolve(__dirname, '../../..'));
|
||||
process.argv.splice(2, 0, ...args);
|
||||
require('../../../scripts/' + name); // eslint-disable-line import/no-dynamic-require
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runKibanaScript('kbn');
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runKibanaScript('eslint', ['x-pack/plugins/canvas/**/*.{js,jsx,ts,tsx}']);
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runGulpTask('canvas:test');
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runGulpTask('canvas:test:common');
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runGulpTask('canvas:test:plugins');
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
require('./_helpers').runGulpTask('canvas:test:mocha');
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { download, paths } from '@kbn/screenshotting-plugin/server/utils';
|
||||
|
||||
export const downloadChromium = async () => {
|
||||
// eslint-disable-next-line no-console
|
||||
const consoleLogger = (tag: string) => (message: unknown) => console.log(tag, message);
|
||||
const logger = {
|
||||
get: () => logger,
|
||||
debug: consoleLogger('debug'),
|
||||
info: consoleLogger('info'),
|
||||
warn: consoleLogger('warn'),
|
||||
trace: consoleLogger('trace'),
|
||||
error: consoleLogger('error'),
|
||||
fatal: consoleLogger('fatal'),
|
||||
log: consoleLogger('log'),
|
||||
};
|
||||
|
||||
// Download Chromium for all platforms
|
||||
await Promise.all(paths.packages.map((pkg) => download(pkg, logger)));
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue