Skip to content

Commit

Permalink
feat: allow frameworks to add preprocessors
Browse files Browse the repository at this point in the history
This changes the order in which things are instantiated. Plugins are instantiated before preprocessors and all the other stuff required by `start` method. Thus a plugin can change `preprocessors` configuration before preprocessor consumes it.
  • Loading branch information
Taylor Hakes authored and dignifiedquire committed May 20, 2015
1 parent fe6ed7e commit f6f5eec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/server.js
Expand Up @@ -27,10 +27,6 @@ var log = logger.create();
var start = function(injector, config, launcher, globalEmitter, preprocess, fileList, webServer,
capturedBrowsers, socketServer, executor, done) {

config.frameworks.forEach(function(framework) {
injector.get('framework:' + framework);
});

var filesPromise = fileList.refresh();

if (config.autoWatch) {
Expand Down Expand Up @@ -311,5 +307,9 @@ exports.start = function(cliOptions, done) {

var injector = new di.Injector(modules);

config.frameworks.forEach(function(framework) {
injector.get('framework:' + framework);
});

injector.invoke(start);
};

0 comments on commit f6f5eec

Please sign in to comment.