[grunt] require opt-into different task name

This commit is contained in:
spalger 2016-03-10 11:40:21 -07:00
parent 8358ca4356
commit 0574f59d24
2 changed files with 7 additions and 4 deletions

View file

@ -85,11 +85,12 @@ module.exports = function (grunt) {
},
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];
const taskConfig = config[key];
if (taskConfig.__taskName__) {
config[taskConfig.__taskName__] = taskConfig;
delete config[key];
delete taskConfig.__taskName__;
}
});
}

View file

@ -3,6 +3,8 @@ var path = require('path');
module.exports = function (grunt) {
return {
__taskName__: 'downloadSelenium',
options: {
selenium: {
filename: 'selenium-server-standalone-2.48.2.jar',