Comments (7)
@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.
@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.
@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.
@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.
@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.
@phated This issue was already solved by gulp-cli PR #87. Can I close this?
from undertaker.
@sttk thanks for reminding me. I forgot there was an issue about this opened over here.
from undertaker.
Related Issues (20)
- Undertaker links to protestware - blocks pipelines HOT 1
- Error handling HOT 5
- Tasks composition without gulp HOT 5
- Error run gulp serve HOT 2
- Test fails on Node v6.9.1+ HOT 3
- Consider removing lodash modules
- Series/parallel arguments should not have 0 length
- Add test for array as only argument in series/parallel
- settle not working with es2015 async functions HOT 1
- stack trace is unintelligible since error is not serialized properly HOT 1
- Custom registry must have `get` function HOT 2
- timeResolution -> precision
- Raise node version minbar to 0.12 to eliminate the biggest dependencies HOT 1
- Sharing Functionalities example not working for `serial` and `parallel` tasks. HOT 1
- Build failing with AssertionError: Task function must be specified HOT 2
- TypeError: browserSync is not a function HOT 1
- Remove UNDERTAKER_TIME_RESOLUTION HOT 2
- Update repository scaffold
- Namespace 'Undertaker' has no exported member 'TaskCallback'. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undertaker.