karma-runner/karma — pull request #533 by vojtajina (2013-05-06 18:14:33+00:00)
Title: feat(config): allow configurable launchers, preprocessors, reporters

````javascript
karma.configure({
reporters: ['progress', 'html_coverage'],
browsers: ['Chrome', 'my_chrome']
preprocessors: {
'**/*.coffee': ['coffee_bare']
}
});

karma.defineLauncher('my_chrome', 'Chrome', {
flags: ['--start-maximized']
});

karma.definePreprocessor('coffee_bare', 'coffee', {
options: {
bare: true
}
});

karma.defineReporter('html_coverage', 'coverage', {
...
});
````

The reason, why I decided for this solution, rather than inlining (as proposed in #317) is that this solution allows using these custom launchers/reporters from CLI. It also makes it easier to create only a single instance of a preprocessor (if the configuration is the same).

In addition to defining/configuring custom reporters/launchers/preprocessors, each can have a global config, eg:

````javascript
karma.configure({
coffeePreprocessor: {
options: {bare: false}
}
});
````

What do you think ?