2015-08-07 20:49:56 +02:00
|
|
|
require('babel/register')(require('./src/optimize/babelOptions'));
|
2015-08-01 01:33:01 +02:00
|
|
|
|
2014-02-11 00:09:04 +01:00
|
|
|
module.exports = function (grunt) {
|
2014-06-18 19:35:37 +02:00
|
|
|
// set the config once before calling load-grunt-config
|
2015-07-23 01:21:49 +02:00
|
|
|
// and once during so that we have access to it via
|
2014-06-18 19:35:37 +02:00
|
|
|
// grunt.config.get() within the config files
|
|
|
|
var config = {
|
|
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
|
|
root: __dirname,
|
2015-06-26 00:44:06 +02:00
|
|
|
src: __dirname + '/src',
|
|
|
|
build: __dirname + '/build', // temporary build directory
|
|
|
|
plugins: __dirname + '/src/plugins',
|
2015-06-26 00:59:55 +02:00
|
|
|
server: __dirname + '/src/server',
|
2015-06-26 00:44:06 +02:00
|
|
|
target: __dirname + '/target', // location of the compressed build targets
|
2015-07-21 00:29:48 +02:00
|
|
|
testUtilsDir: __dirname + '/src/testUtils',
|
2015-06-26 00:44:06 +02:00
|
|
|
configFile: __dirname + '/src/config/kibana.yml',
|
2014-06-18 19:35:37 +02:00
|
|
|
|
2015-07-28 17:23:56 +02:00
|
|
|
karmaBrowser: (function () {
|
|
|
|
switch (require('os').platform()) {
|
|
|
|
case 'win32':
|
|
|
|
return 'IE';
|
|
|
|
case 'darwin':
|
|
|
|
return 'Chrome';
|
|
|
|
default:
|
|
|
|
return 'Firefox';
|
|
|
|
}
|
|
|
|
}()),
|
|
|
|
|
2015-01-09 19:08:14 +01:00
|
|
|
nodeVersion: '0.10.35',
|
|
|
|
platforms: ['darwin-x64', 'linux-x64', 'linux-x86', 'windows'],
|
2015-08-01 01:33:01 +02:00
|
|
|
services: [
|
|
|
|
['launchd', '10.9'],
|
|
|
|
['upstart', '1.5'],
|
|
|
|
['systemd', 'default'],
|
|
|
|
['sysv', 'lsb-3.1']
|
|
|
|
],
|
2014-09-04 00:15:58 +02:00
|
|
|
|
2015-07-16 09:00:42 +02:00
|
|
|
devPlugins: 'devMode',
|
2014-10-23 08:30:49 +02:00
|
|
|
|
2014-06-18 19:35:37 +02:00
|
|
|
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'
|
2015-02-07 20:26:20 +01:00
|
|
|
},
|
|
|
|
lintThese: [
|
|
|
|
'Gruntfile.js',
|
|
|
|
'<%= root %>/tasks/**/*.js',
|
2015-06-25 19:31:50 +02:00
|
|
|
'<%= src %>/**/*.js',
|
2015-07-21 00:29:48 +02:00
|
|
|
'!<%= src %>/fixtures/**/*.js'
|
2015-02-07 20:26:20 +01:00
|
|
|
]
|
2014-06-18 19:35:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
grunt.config.merge(config);
|
|
|
|
|
|
|
|
// load plugins
|
|
|
|
require('load-grunt-config')(grunt, {
|
|
|
|
configPath: __dirname + '/tasks/config',
|
|
|
|
init: true,
|
2015-08-03 18:35:31 +02:00
|
|
|
config: config,
|
|
|
|
loadGruntTasks: {
|
|
|
|
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*']
|
|
|
|
}
|
2014-02-11 00:09:04 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
// load task definitions
|
2014-09-16 23:16:36 +02:00
|
|
|
grunt.task.loadTasks('tasks');
|
2014-08-26 02:55:32 +02:00
|
|
|
};
|