Skip to content

Commit

Permalink
fix(docs): update
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Mar 19, 2017
1 parent cd95b77 commit 7397d1f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,20 @@ const dushTapReport = require('dush-tap-report')

## API

### [tapReport](index.js#L83)
> A simple TAP report producing plugin for [dush][] or anything based on it. It returns a function that can be passed to dush's `.use` method.
### [tapReport](index.js#L93)
> A simple TAP report producing plugin for [dush][] or anything based on it. It returns a function that can be passed to dush's `.use` method. This plugin will also work for [minibase][] and [base][] mini frameworks for building robust apps.
**Params**

* `options` **{Object}**: optional options, merged with `app.options` if exist
* `options` **{Object}**: optional options, merged with `app.options`, passed to [stacktrace-metadata][] and [find-callsite][]
* `options.writeLine` **{Function}**: a logger function called on each line, default `console.log`
* `returns` **{Function}**: a plugin function that should be passed to `.use` method of [minibase][] or [dush][]
* `options.cleanStack` **{Boolean}**: if `false` won't clean stack trace from node internals, [clean-stacktrace][]
* `options.shortStack` **{Boolean}**: if `false` full stack traces, otherwise they are just four
* `options.showStack` **{Boolean}**: if `false` the error.stack will be empty string
* `options.relativePaths` **{Boolean}**: if `false` paths in stack traces will be absolute, [clean-stacktrace-relative-paths][]
* `options.mapper` **{Function}**: called on each line of the stack with `(line, index)` signature
* `options.cwd` **{String}**: current working directory, default `process.cwd()`
* `returns` **{Function}**: a plugin function that should be passed to `.use` method of [minibase][], [base][] or [dush][]

**Example**

Expand Down Expand Up @@ -209,4 +215,8 @@ _Project scaffolded using [charlike][] cli._
[paypalme-url]: https://www.paypal.me/tunnckoCore
[paypalme-img]: https://img.shields.io/badge/paypal-donate-brightgreen.svg

[dush]: https://github.com/tunnckocore/dush
[clean-stacktrace-relative-paths]: https://github.com/tunnckocore/clean-stacktrace-relative-paths
[clean-stacktrace]: https://github.com/tunnckocore/clean-stacktrace
[dush]: https://github.com/tunnckocore/dush
[find-callsite]: https://github.com/tunnckocore/find-callsite
[stacktrace-metadata]: https://github.com/tunnckocore/stacktrace-metadata
16 changes: 13 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var stackdata = require('stacktrace-metadata')

/**
* > A simple TAP report producing plugin for [dush][] or anything based on it.
* It returns a function that can be passed to dush's `.use` method.
* It returns a function that can be passed to dush's `.use` method. This plugin
* will also work for [minibase][] and [base][] mini frameworks for building robust apps.
*
* **Example**
*
Expand Down Expand Up @@ -73,10 +74,19 @@ var stackdata = require('stacktrace-metadata')
* // # fail 1
* ```
*
* @param {Object} `options` optional options, merged with `app.options` if exist
* @param {Object} `options` optional options, merged with `app.options`,
* passed to [stacktrace-metadata][] and [find-callsite][]
* @param {Function} `options.writeLine` a logger function called on each line, default `console.log`
* @param {Boolean} `options.cleanStack` if `false` won't clean stack trace from node internals,
* [clean-stacktrace][]
* @param {Boolean} `options.shortStack` if `false` full stack traces, otherwise they are just four
* @param {Boolean} `options.showStack` if `false` the error.stack will be empty string
* @param {Boolean} `options.relativePaths` if `false` paths in stack traces will be absolute,
* [clean-stacktrace-relative-paths][]
* @param {Function} `options.mapper` called on each line of the stack with `(line, index)` signature
* @param {String} `options.cwd` current working directory, default `process.cwd()`
* @return {Function} a plugin function that should be
* passed to `.use` method of [minibase][] or [dush][]
* passed to `.use` method of [minibase][], [base][] or [dush][]
* @api public
*/

Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@
"once",
"standard-version",
"verb",
"verb-generate-readme"
"verb-generate-readme",
"clean-stacktrace",
"clean-stacktrace-relative-paths",
"dush",
"find-callsite",
"stacktrace-metadata"
]
}
}

0 comments on commit 7397d1f

Please sign in to comment.