-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add doc for registry #12
Conversation
Custom registries are constructor allowing you to pre-define/share tasks | ||
or add custom functionality to your registries. | ||
|
||
A registries prototype should define: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry's
This is amazing!!!!!! Just a couple of nits. Thank you so so so so so much for putting the time to write this up. |
523aa59
to
d3a4b82
Compare
d3a4b82
to
3f67a70
Compare
@phated You're welcome. Thanks for all your work. |
❤️ I was dreading writing these. Thanks again |
console.log('Server bind to ' + this.bindTo); | ||
console.log('Serving' + this.build); | ||
cb(); | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phated is that example works? I am not sure how the tasks get run. It seems Undertaker.prototype.get returns the original function, not the wrapped one.
[...]
taker.task('default', function(cb) {
console.log('Server bind to ' + this.bindTo);
console.log('Serving' + this.build);
cb();
});
var noop = function(){};
tasker.get('default')(noop);
// Server bind to undefined
// Serving undefined
tasker._registry.get('default')(noop);
// Server bind to 0.0.0.0:8888
// Serving './build'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nerver mind
tasker.parallel(['default])(noop);
// Server bind to 0.0.0.0:8888
// Serving ./build
fix #10