Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with gulp-jsdoc #33

Open
Chowarmaan opened this issue May 26, 2015 · 2 comments
Open

Not working with gulp-jsdoc #33

Chowarmaan opened this issue May 26, 2015 · 2 comments

Comments

@Chowarmaan
Copy link

I have a syntax error in a file (missing '};') and the gulp-jsdoc module will throw an exception, but gulp-plumber does not catch this and keep working.

Sample JS:
angular.module('MyApp').service("Data", ["$firebaseObject", "$firebaseArray", "GetFireBaseObject",
function($firebaseObject, $firebaseArray, GetFireBaseObject) {
var MemberRef = GetFireBaseObject.DataURL('data/');

    this.AddMember = function(MemberKey) {
        var OneMemberRef = MemberRef.child(MemberKey);
        return $firebaseObject(OneMemberRef);
    };

    this.DeleteMember = function(MemberKey) {
        var OneMemberRef = MemberRef.child(MemberKey);
        OneMemberRef.remove();

// }; // Commented out to cause error.

}

]);

Gulp fails with Error: Line xx: Unexpected token )

Gulp.Task:
gulp.task('Documentation-API', function() {
return gulp.src(SourcePath.javascript, {cwd: RootDir.home})
.pipe(plumber( { errorHandler: OnErrorHandler } ))
.pipe(jsdoc.parser())
.pipe(jsdoc.generator(RootDir.docs + DocumentationPath.javascript )
);
});

@floatdrop
Copy link
Owner

gulp-jsdoc uses https://github.com/juliangruber/multipipe, which replaces default error handler - so plumber thinks new error handler is intentionally placed and do nothing. Maybe it is better to force-replace error handlers after plumber, since this is not first new error handler problem occurrence.

@floatdrop floatdrop changed the title Gulp-Plumber exits on Gulp-JSDOC error Not working with gulp-jsdoc May 27, 2015
@Chowarmaan
Copy link
Author

That makes sense, as it would likely stop more reports with different external tools be logged, that all use the https://github.com/juliangruber/multipipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants