Skip to content

Commit 317ffe3

Browse files
committed
Make setLocation and setConsole private and modify api doc
1 parent acb4e50 commit 317ffe3

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

gulpfile.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,28 @@ gulp.task('test', ['lint'], function () {
4141

4242
});
4343

44+
var execCallback = function (callback) {
45+
return function (error, stdout, stderr) {
46+
if (stdout) {
47+
console.log(stdout);
48+
}
49+
50+
if (stderr) {
51+
console.log(stderr);
52+
}
53+
54+
callback(error);
55+
};
56+
};
57+
4458

4559
gulp.task('doc', function (cb) {
46-
exec('jsduck --config=.jsduck.json', function (err, stdout, stderr) {
47-
console.log(stdout);
48-
console.log(stderr);
49-
cb(err);
50-
});
60+
exec('jsduck --config=.jsduck.json', execCallback(cb));
5161
});
5262

5363

5464
gulp.task('doc-release', function (cb) {
55-
exec('jsduck --config=.jsduck.release.json', function (err, stdout, stderr) {
56-
console.log(stdout);
57-
console.log(stderr);
58-
cb(err);
59-
});
65+
exec('jsduck --config=.jsduck.release.json', execCallback(cb));
6066
});
6167

6268

straw-ios.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ straw.core = (function () {
336336
*
337337
* This method is used only for test.
338338
*
339-
* @param {Location} location location object
339+
* @private
340+
*
341+
* @param {Object} location location object
340342
*/
341343
strawApiPt.setLocation = function (location) {
342344
strawCore.location = location;
@@ -348,7 +350,9 @@ straw.core = (function () {
348350
*
349351
* This method is used only for test.
350352
*
351-
* @param {Console} console console object
353+
* @private
354+
*
355+
* @param {Object} console console object
352356
*/
353357
strawApiPt.setConsole = function (console) {
354358
strawCore.console = console;

0 commit comments

Comments
 (0)