mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 08:49:27 -04:00
* [codeshift] add proper ignore comments * [codeshift] apply require-to-import transform * [codeshift/fixup] remove duplicate imports * [eslint] upgrade config for react "unused" support * [codeshift] apply remove-unused-imports transform * [codeshift] apply remove-unused-basic-requires transform * [codeshift] apply remove-unused-function-arguments transform * [lintroller] fix argument list spacing * [codeshift] apply remove-unused-basic-bars transform * [codeshift/fixup] fixup unused basic var removals * manually apply remove-unused-assignments transform * [codeshift] reapply remove-unused-imports transform * [codeshift] reapply remove-unused-function-arguments transform * [eslint] autofix param spacing * manually fix remaining no-undef errors * use more descriptive file ignore pattern * add eslint-plugin-react peerDependency * replace values that looked unused in tests * remove // kibana-jscodeshift-no-babel comment * remove import statements from code required by api tests * Remove '// kibana-jscodeshift-ignore' comments * address review feedback * remove remnant of removed if condition
27 lines
865 B
JavaScript
27 lines
865 B
JavaScript
import { basename, resolve } from 'path';
|
|
module.exports = function (grunt) {
|
|
const exec = require('../utils/exec').silent;
|
|
|
|
grunt.registerTask('_build:versionedLinks', function () {
|
|
const rootPath = grunt.config.get('root');
|
|
|
|
const buildFiles = grunt.file.expand('build/kibana/{*,.*}')
|
|
.map(function (file) {
|
|
return resolve(rootPath, file);
|
|
});
|
|
|
|
const transferFiles = (source, link) => exec('cp', ['-r', source, link]);
|
|
|
|
grunt.config.get('platforms').forEach(function (platform) {
|
|
grunt.file.mkdir(platform.buildDir);
|
|
|
|
// link all files at the root of the build
|
|
buildFiles.forEach(function (source) {
|
|
transferFiles(source, resolve(platform.buildDir, basename(source)));
|
|
});
|
|
|
|
// link the node modules
|
|
transferFiles(platform.nodeDir, resolve(platform.buildDir, 'node'));
|
|
});
|
|
});
|
|
};
|