2018-05-29 05:06:30 +02:00
|
|
|
/*
|
|
|
|
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
|
|
* license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright
|
|
|
|
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
|
2018-05-25 19:43:01 +02:00
|
|
|
require('./src/setup_node_env');
|
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
|
2016-03-10 20:42:45 +01:00
|
|
|
const config = {
|
2014-06-18 19:35:37 +02:00
|
|
|
root: __dirname,
|
|
|
|
};
|
|
|
|
|
|
|
|
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: {
|
2017-04-12 00:01:06 +02:00
|
|
|
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*']
|
2015-08-03 18:35:31 +02:00
|
|
|
}
|
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
|
|
|
};
|