Skip to content

Commit 081132d

Browse files
committed
Update dependencies and documentation
- prova -> tap - removes ability to swap in documentation instances
1 parent e56c7d0 commit 081132d

File tree

3 files changed

+11
-31
lines changed

3 files changed

+11
-31
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
var through2 = require('through2'),
2-
File = require('vinyl');
1+
var documentation = require('documentation');
2+
var through2 = require('through2');
3+
var File = require('vinyl');
34

45
/**
56
* Documentation stream intended for use within the gulp system.
@@ -55,9 +56,8 @@ var through2 = require('through2'),
5556
* });
5657
*
5758
*/
58-
module.exports = function (options, documentation) {
59+
module.exports = function (options) {
5960
options = options || {};
60-
documentation = documentation || require('documentation');
6161

6262
var docOptions = {
6363
github : !!(options.github || options.g),
@@ -73,7 +73,7 @@ module.exports = function (options, documentation) {
7373
files.push(file);
7474
cb();
7575
}, function (cb) {
76-
documentation(files.map(function(file) {
76+
documentation.build(files.map(function(file) {
7777
return file.path;
7878
}), docOptions, function(err, comments) {
7979
formatter(comments, {}, function (err, output) {

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,25 @@
99
"vinyl": "^2.0.0"
1010
},
1111
"devDependencies": {
12+
"concat-stream": "^1.4.8",
1213
"eslint": "^3.9.1",
1314
"gulp": "^3.8.11",
14-
"concat-stream": "^1.4.8",
15-
"prova": "^3.0.0",
1615
"proxyquire": "^1.7.3",
17-
"tape": "^4.6.2"
16+
"tap": "8.0.0"
1817
},
1918
"keywords": [
2019
"documentation",
2120
"gulp",
2221
"gulpplugin",
2322
"jsdoc"
2423
],
25-
"license": "ISC",
24+
"license": "BSD-2-Clause",
2625
"main": "index.js",
2726
"repository": {
2827
"type": "git",
2928
"url": "[email protected]:documentationjs/gulp-documentation.git"
3029
},
3130
"scripts": {
32-
"test": "eslint . && prova test/test.js"
31+
"test": "eslint . && tap test/test.js"
3332
}
3433
}

test/test.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
var test = require('prova'),
1+
var test = require('tap').test,
22
path = require('path'),
33
concat = require('concat-stream'),
44
gulp = require('gulp'),
5-
proxyquire = require('proxyquire'),
65
documentation = require('../');
76

87
test('gulp-documentation', function(t) {
@@ -41,29 +40,11 @@ test('gulp-documentation html', function(t) {
4140
gulp.src(path.join(__dirname, '/fixture.js'))
4241
.pipe(documentation({ format: 'html' }))
4342
.pipe(concat(function(d) {
44-
t.equal(d.length, 7);
43+
t.equal(d.length, 34);
4544
t.end();
4645
}));
4746
});
4847

49-
test('gulp-documentation github links', function(t) {
50-
var through2Stub = {
51-
obj : function (indexes, callback) {
52-
callback.call();
53-
}
54-
},
55-
documentationStub = function(indexes, options) {
56-
t.equal(options.github, true);
57-
t.end();
58-
},
59-
documentationjs = proxyquire('../', {
60-
'through2': through2Stub,
61-
'documentation': documentationStub
62-
});
63-
64-
documentationjs({ format: 'html', github: true });
65-
});
66-
6748
test('gulp-documentation exit callback', function(t) {
6849
t.plan(1);
6950
gulp.src(path.join(__dirname, '/fixture.js'))

0 commit comments

Comments
 (0)