Skip to content

Commit 993491d

Browse files
committed
removed .createExplainStream()
1 parent ae3f5b3 commit 993491d

File tree

6 files changed

+4
-263
lines changed

6 files changed

+4
-263
lines changed

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
## jsdoc-api
1414
A programmatic interface for [jsdoc3](https://github.com/jsdoc3/jsdoc) with a few features:
1515

16-
- Sync, async (Promise) and streaming interfaces on the two main jsdoc operations ('explain' and 'render documentation').
17-
- Input (source code) can supplied as a string, set of file names/globs or a stream.
16+
- Sync and async (Promise) interfaces on the two main jsdoc operations ('explain' and 'render documentation').
17+
- Input (source code) can supplied as a string or set of file names/globs.
1818
- Optional caching, dramatically speeding up future invocations with the same input.
1919
- Supports html input
2020

@@ -50,7 +50,6 @@ A programmatic interface for [jsdoc3](https://github.com/jsdoc3/jsdoc) with a fe
5050
* [.cache](#module_jsdoc-api.cache) : <code>[cache-point](https://github.com/75lb/cache-point)</code>
5151
* [.explainSync([options])](#module_jsdoc-api.explainSync) ⇒ <code>Array.&lt;object&gt;</code>
5252
* [.explain([options])](#module_jsdoc-api.explain) ⇒ <code>Promise</code>
53-
* [.createExplainStream([options])](#module_jsdoc-api.createExplainStream) ⇒ <code>Duplex</code>
5453
* [.renderSync([options])](#module_jsdoc-api.renderSync)
5554
* _inner_
5655
* [~JsdocOptions](#module_jsdoc-api..JsdocOptions)
@@ -101,23 +100,6 @@ Returns a promise for the jsdoc explain output.
101100
| --- | --- |
102101
| [options] | <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> |
103102

104-
<a name="module_jsdoc-api.createExplainStream"></a>
105-
106-
### jsdoc.createExplainStream([options]) ⇒ <code>Duplex</code>
107-
Returns a duplex stream, into which you can pipe source code and receive explain output at the other end.
108-
109-
**Kind**: static method of <code>[jsdoc-api](#module_jsdoc-api)</code>
110-
111-
| Param | Type |
112-
| --- | --- |
113-
| [options] | <code>[JsdocOptions](#module_jsdoc-api..JsdocOptions)</code> |
114-
115-
**Example**
116-
```js
117-
fs.createReadStream('source-code.js')
118-
.pipe(jsdoc.createExplainStream())
119-
.pipe(process.stdout)
120-
```
121103
<a name="module_jsdoc-api.renderSync"></a>
122104

123105
### jsdoc.renderSync([options])

es5/jsdoc-api.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
44

55
exports.explainSync = explainSync;
66
exports.explain = explain;
7-
exports.createExplainStream = createExplainStream;
87
exports.renderSync = renderSync;
98

109
var path = require('path');
@@ -26,12 +25,6 @@ function explain(options) {
2625
return command.execute();
2726
}
2827

29-
function createExplainStream(options) {
30-
options = new JsdocOptions(options);
31-
var ExplainStream = require('./explain-stream');
32-
return new ExplainStream(explain, options);
33-
}
34-
3528
function renderSync(options) {
3629
options = new JsdocOptions(options);
3730
var RenderSync = require('./render-sync');

lib/explain-stream.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

lib/jsdoc-api.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* A programmatic interface for [jsdoc3](https://github.com/jsdoc3/jsdoc) with a few features:
55
*
6-
* - Sync, async (Promise) and streaming interfaces on the two main jsdoc operations ('explain' and 'render documentation').
7-
* - Input (source code) can supplied as a string, set of file names/globs or a stream.
6+
* - Sync and async (Promise) interfaces on the two main jsdoc operations ('explain' and 'render documentation').
7+
* - Input (source code) can supplied as a string or set of file names/globs.
88
* - Optional caching, dramatically speeding up future invocations with the same input.
99
* - Supports html input
1010
*
@@ -37,7 +37,6 @@
3737
*/
3838
exports.explainSync = explainSync
3939
exports.explain = explain
40-
exports.createExplainStream = createExplainStream
4140
exports.renderSync = renderSync
4241

4342
const path = require('path')
@@ -78,23 +77,6 @@ function explain (options) {
7877
return command.execute()
7978
}
8079

81-
/**
82-
* Returns a duplex stream, into which you can pipe source code and receive explain output at the other end.
83-
*
84-
* @param [options] {module:jsdoc-api~JsdocOptions}
85-
* @returns {Duplex}
86-
* @static
87-
* @example
88-
* fs.createReadStream('source-code.js')
89-
* .pipe(jsdoc.createExplainStream())
90-
* .pipe(process.stdout)
91-
*/
92-
function createExplainStream (options) {
93-
options = new JsdocOptions(options)
94-
const ExplainStream = require('./explain-stream')
95-
return new ExplainStream(explain, options)
96-
}
97-
9880
/**
9981
* Render jsdoc documentation.
10082
*

test/createExplainStream.js

Lines changed: 0 additions & 145 deletions
This file was deleted.

test/html.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,3 @@ test('.explain({ files, html: true })', function () {
1212
a.deepEqual(output, f.getExpectedOutput(output))
1313
})
1414
})
15-
16-
test('.createExplainStream({ files, html: true })', function () {
17-
var f = new Fixture('html', '0-src.html')
18-
return new Promise(function (resolve, reject) {
19-
jsdoc.createExplainStream({ files: f.sourcePath, html: true })
20-
.pipe(collectJson(function (output) {
21-
var expectedOutput = f.getExpectedOutput(output)
22-
try {
23-
a.deepEqual(output, expectedOutput)
24-
resolve()
25-
} catch (err) {
26-
reject(err)
27-
}
28-
}))
29-
.on('error', reject)
30-
})
31-
})

0 commit comments

Comments
 (0)