mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
* [eslint] upgrade to 4.10.0
* [eslint-config-kibana] limit jest config to jest test files
* [ui_framework] remove trailing comma from rest-spreads
* [dashboard/tests] tag jest helpers with .test.js suffix
* explicitly import expect.js where used
* [eslint] apply auto-fixes
* [eslint] manually add/wrap some parens for compliance
* [npm] point to local packages for testing/review
* [jest] remove .test extension from jest helpers
* [ui_framework] fix trailing comma removal from 3bc661a1c8
* [packages] upgrade eslint packages
27 lines
871 B
JavaScript
27 lines
871 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'));
|
|
});
|
|
});
|
|
};
|