-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Can't get task description and flags because returning wrapped function #65
Comments
@sttk that was an unintentional regression with this change. This change needed to be implemented to fix gulpjs/gulp#1492 Do you think we should mirror those properties onto the wrapper function? It feels like that leaks gulp details. I think the best solution would be to use |
@phated I've modified
I think it is OK, but does the name gulp.task('clean', function() { ... });
gulp.task('clean').description = '...';
gulp.task('default', gulp.series(...));
gulp.task('default').description = '...'; And now users can set them as follows: gulp.task('clean', function() { ... });
gulp.task('clean').unwrap().description = '...';
gulp.task('default', gulp.series(...));
gulp.task('default').unwrap().description = '...'; Or are these bad manners? |
@phated By the way, if |
@sttk I've been thinking about this all morning. The wrapper function should still be a function but the CLI should check for |
@phated But this is a mere idea. I accept your saying that the wrapper should be a function. |
@phated This issue was already solved by gulp-cli PR #87. Can I close this? |
@sttk thanks for reminding me. I forgot there was an issue about this opened over here. |
By modification that
gulp.task(name)
returns wrapped function instead of original function,gulp-cli
can't get task description and flags now.Since
gulp.task(name).unwrap()
returns original function, we can get description and flags bygulp.task(name).unwrap().description
andgulp.task(name).unwrap().flags
.Is this intentional way?
The text was updated successfully, but these errors were encountered: