Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
feat: use plugin options
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed May 15, 2016
1 parent 54adb9d commit c9a0fe4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -29,7 +29,7 @@ module.exports = (mos, md) => {
})

function createCommand (opts) {
opts = opts || {}
opts = Object.assign({}, md.options, opts || {})
const commands = opts.useShortAlias ? shortCommands : fullCommands
if (md.pkg.private || md.pkg.license === 'private') {
return [
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/local-package-short-via-plugin-opts/config.json
@@ -0,0 +1,3 @@
{
"useShortAlias": true
}
6 changes: 6 additions & 0 deletions test/fixtures/local-package-short-via-plugin-opts/input.md
@@ -0,0 +1,6 @@
# foo

bla bla

<!--@installation()-->
<!--/@-->
11 changes: 11 additions & 0 deletions test/fixtures/local-package-short-via-plugin-opts/output.md
@@ -0,0 +1,11 @@
# foo

bla bla

<!--@installation()-->
## Installation

```sh
npm i -S foo
```
<!--/@-->
@@ -0,0 +1,3 @@
{
"name": "foo"
}

0 comments on commit c9a0fe4

Please sign in to comment.