Git Product home page Git Product logo

Comments (7)

phated avatar phated commented on June 27, 2024

@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 unwrap() in gulp-cli. Thoughts?

from undertaker.

sttk avatar sttk commented on June 27, 2024

@phated I've modified gulp-cli to adapt to both v1.0.0 and previous versions of undertaker in this PR.

I think the best solution would be to use unwrap() in gulp-cli.

I think it is OK, but does the name unwrap become official?
Users could set task description and flags in following way:

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?

from undertaker.

sttk avatar sttk commented on June 27, 2024

@phated By the way, if gulp.task(name) need not to return its original function, I think taskWrapper need not to be a function and is better to be an object. Because an object can have name property and would be suitable to have properties for a task such as description and flags

from undertaker.

phated avatar phated commented on June 27, 2024

@sttk I've been thinking about this all morning. The wrapper function should still be a function but the CLI should check for taskWrapper.description before attempting taskWrapper.unwrap().description (and similar for flags). That should support all the old ways of supplying flags/descriptions. Remember, flags and descriptions are something that gulp (specifically gulp-cli) care about and shouldn't leak into undertaker.

from undertaker.

sttk avatar sttk commented on June 27, 2024

@phated description and flags are examples and what I want to say above are about any properties and about extensibility of undertaker or applications using it.

But this is a mere idea. I accept your saying that the wrapper should be a function.

from undertaker.

sttk avatar sttk commented on June 27, 2024

@phated This issue was already solved by gulp-cli PR #87. Can I close this?

from undertaker.

phated avatar phated commented on June 27, 2024

@sttk thanks for reminding me. I forgot there was an issue about this opened over here.

from undertaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.