kibana/Gruntfile.js
jasper f9690a6cbc Upgrade eslint (#9449)
Backports PR #9357

**Commit 1:**
upgrade eslint, all related deps, and config files

* Original sha: 054e798a93
* Authored by spalger <email@spalger.com> on 2016-08-24T23:39:11Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:04:20Z

**Commit 2:**
replace gruntify-eslint with basic eslint-cli wrapper

* Original sha: 71732e770f
* Authored by spalger <email@spalger.com> on 2016-09-02T21:33:02Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:41:36Z

**Commit 3:**
arrow-IIFEs must be invoked outside of the parens

* Original sha: b05662cd29
* Authored by spalger <email@spalger.com> on 2016-08-25T17:47:57Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:41:40Z

**Commit 4:**
move import statements before their use

* Original sha: 3572ab8e17
* Authored by spalger <email@spalger.com> on 2016-08-25T17:48:30Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:41:40Z

**Commit 5:**
reindent to satisfy new indentation check algorithm

* Original sha: b31dae18f5
* Authored by spalger <email@spalger.com> on 2016-08-25T17:49:47Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:41:58Z

**Commit 6:**
place missing semicolon

* Original sha: 7b39475116
* Authored by spalger <email@spalger.com> on 2016-09-06T22:27:10Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:42:04Z

**Commit 7:**
ignore copy-pasted decode geohash code

* Original sha: 3c02df9f4f
* Authored by spalger <email@spalger.com> on 2016-09-10T01:49:42Z
* Committed by spalger <spalger@users.noreply.github.com> on 2016-12-02T23:42:04Z

**Commit 8:**
Merge branch 'master' of github.com:elastic/kibana into upgrade/eslint-try2

* Original sha: 1224b1829a
* Authored by spalger <spalger@users.noreply.github.com> on 2016-12-10T04:14:32Z

**Commit 9:**
[grunt/eslint] fix argument spacing

* Original sha: 6fa2c6cad0
* Authored by spalger <spalger@users.noreply.github.com> on 2016-12-10T04:22:42Z

**Commit 10:**
[gurnt/eslint] add comment about contents of report

* Original sha: 71834ca7ec
* Authored by spalger <spalger@users.noreply.github.com> on 2016-12-10T07:59:11Z

**Commit 11:**
Merge branch 'master' of github.com:elastic/kibana into upgrade/eslint-try2

* Original sha: 76e77a7576
* Authored by spalger <spalger@users.noreply.github.com> on 2016-12-12T20:17:05Z

**Commit 12:**
[grunt/tasks] use `export default`

* Original sha: 803c0dacba
* Authored by spalger <spalger@users.noreply.github.com> on 2016-12-12T20:19:27Z
2016-12-12 15:49:09 -07:00

68 lines
2.2 KiB
JavaScript

const camelCase = require('lodash').camelCase;
require('babel/register')(require('./src/optimize/babel_options').node);
module.exports = function (grunt) {
// set the config once before calling load-grunt-config
// and once during so that we have access to it via
// grunt.config.get() within the config files
const config = {
pkg: grunt.file.readJSON('package.json'),
root: __dirname,
src: __dirname + '/src',
buildDir: __dirname + '/build', // temporary build directory
plugins: __dirname + '/src/core_plugins',
server: __dirname + '/src/server',
target: __dirname + '/target', // location of the compressed build targets
testUtilsDir: __dirname + '/src/test_utils',
configFile: __dirname + '/src/config/kibana.yml',
karmaBrowser: (function () {
if (grunt.option('browser')) {
return grunt.option('browser');
}
switch (require('os').platform()) {
case 'win32':
return 'IE';
default:
return 'Chrome';
}
}()),
nodeVersion: grunt.file.read('.node-version').trim(),
meta: {
banner: '/*! <%= package.name %> - v<%= package.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= package.homepage ? " * " + package.homepage + "\\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= package.author.company %>;' +
' Licensed <%= package.license %> */\n'
},
};
grunt.config.merge(config);
// must run before even services/platforms
grunt.config.set('build', require('./tasks/config/build')(grunt));
config.packageScriptsDir = __dirname + '/tasks/build/package_scripts';
// ensure that these run first, other configs need them
config.services = require('./tasks/config/services')(grunt);
config.platforms = require('./tasks/config/platforms')(grunt);
grunt.config.merge(config);
// load plugins
require('load-grunt-config')(grunt, {
configPath: __dirname + '/tasks/config',
init: true,
config: config,
loadGruntTasks: {
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*', 'intern']
}
});
// load task definitions
grunt.task.loadTasks('tasks');
grunt.task.loadTasks('tasks/build');
};