Commit Graph
7 Commits
Author SHA1 Message Date
Stephan Bönnemann d9eeb3fcae refactor: use one config object instead of passing arguments to plugins on their own
This commit does a lot but it's all connected and tries to make everything more extensible and future proof.

1. CLI arguments and options from the "package.json" are no longer treated as two different things. You can now pass options either way.

BREAKING CHANGE: cli arguments are now normalized to camelCase, so e.g. `options['github-url']` is now `options.githubUrl`

2. Plugins no longer receive config they need one by one, but in one huge object. This way it's easier to pass more info in the future w/o breaking existing plugins that rely on the position of the callback in the arguments array.

BREAKING CHANGE: Plugins now need to read their passed options from one huge config object.

Old:
```js
module.exports = function (pluginConfig, foo, bar, cb) {…}
```

New:
```js
// ES5
module.exports = function(pluginConfig, config, cb) {
  var foo = config.foo
  var bar = config.bar
  …
}

// ES6
module.exports = function (pluginConfig, {foo, bar}, cb) {…}
```
2015-07-19 15:34:30 +02:00
Stephan Bönnemann 150273c8fe fix(plugins): rename plugins 2015-07-13 11:53:32 +02:00
Stephan Bönnemann 057e8e9759 feat(plugins): normalize plugins and have unified function signature 2015-06-18 16:48:28 -07:00
Stephan Bönnemann 689f37ae2e test(specs): how about running ALL tests? 2015-06-14 21:50:53 -07:00
Stephan Bönnemann 6df67828fe refactor(commits,type): simplify interfaces 2015-06-14 21:49:39 -07:00
Stephan Bönnemann 66bf8ff710 refactor(mocks): extract from specs 2015-06-14 21:07:39 -07:00
Stephan Bönnemann f79e26dcd6 test(type): initial suite 2015-06-14 19:39:38 -07:00