Skip to content

Commit

Permalink
README updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Jan 26, 2016
1 parent 0167de9 commit d1adef7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,23 @@ remi.register(app, [{
## Main plugin

You can specify the plugin that should be registered first by passing its name
through the `main` option of the shared options. The main plugin can't have any
through the `main` option of the `Remi` class constructor options. The main plugin can't have any
dependencies.

```js
function barPlugin(app, opts, next) {
function barPlugin(app, opts) {
console.log('Hello world!')

next()
}

barPlugin.attributes = {
name: 'bar-plugin',
version: '1.0.0',
};

remi.register(app, [fooPlugin, barPlugin, qazPlugin], {
let remi = new Remi({
main: 'bar-plugin' /* the bar-plugin will be registered first */
}, function (err) {
})
remi.register(app, [fooPlugin, barPlugin, qazPlugin], function (err) {
})
```

Expand Down
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
* if there's an error during a plugin initialization, include the plugin's name to the thrown error

* add `debug` to print the sequence of plugins registrations

0 comments on commit d1adef7

Please sign in to comment.