Skip to content

Commit

Permalink
Update use interface
Browse files Browse the repository at this point in the history
The support was wonky in some places.

* Remove support for passing a processor to `use`;
* Add support for passing a `list`, `matrix` to `use`;

Closes GH-5.
Related to remarkjs/remark#144.
  • Loading branch information
wooorm committed Feb 13, 2016
1 parent d672875 commit 37e4d67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"remark"
],
"dependencies": {
"attach-ware": "^1.0.0",
"attach-ware": "^2.0.0",
"bail": "^1.0.0",
"extend": "^3.0.0",
"unherit": "^1.0.4",
Expand Down
13 changes: 11 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,22 @@ Change the way the processor works by using a plugin.

**Signatures**

* `unified = unified.use(plugin[, input...])`;
* `unified = unified.use(plugins)`.
* `processor.use(plugin[, input...])`;
* `processor.use(plugins[, input...])`;
* `processor.use(list)`;
* `processor.use(matrix)`.

**Parameters**

* `plugin` (`Function`) — [Plugin][].

* `plugins` (`Array.<Function>`) — List of plugins.

* `list` (`Array`) — List where the first value is a `plugin`,
and further values are `input`;

* `matrix` (`Array`) — Matrix where each entry is a `list`.

* `input` (`*`) — Passed to plugin. Specified by its documentation.

**Returns**
Expand Down

0 comments on commit 37e4d67

Please sign in to comment.