mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[grunt/config] rename config for snake_cased tasks
This commit is contained in:
parent
00bf02ab29
commit
07e20936b5
2 changed files with 12 additions and 1 deletions
11
Gruntfile.js
11
Gruntfile.js
|
@ -1,3 +1,4 @@
|
|||
var camelCase = require('lodash').camelCase;
|
||||
require('babel/register')(require('./src/optimize/babel_options').node);
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
@ -81,6 +82,16 @@ module.exports = function (grunt) {
|
|||
config: config,
|
||||
loadGruntTasks: {
|
||||
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*', 'intern']
|
||||
},
|
||||
preMerge(config, data) {
|
||||
Object.keys(config).forEach(key => {
|
||||
const camelKey = camelCase(key);
|
||||
if (key !== camelKey) {
|
||||
grunt.log.debug(`renaming config for ${key} to ${camelKey}`);
|
||||
config[camelKey] = config[key];
|
||||
delete config[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
"karma-safari-launcher": "0.1.1",
|
||||
"libesvm": "3.3.0",
|
||||
"license-checker": "3.1.0",
|
||||
"load-grunt-config": "0.7.2",
|
||||
"load-grunt-config": "0.19.1",
|
||||
"makelogs": "3.0.0-beta3",
|
||||
"marked-text-renderer": "0.1.0",
|
||||
"mocha": "2.3.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue