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

Add doc for registry #12

Merged
merged 1 commit into from
Feb 26, 2015
Merged

Conversation

dinoboff
Copy link
Contributor

fix #10

Custom registries are constructor allowing you to pre-define/share tasks
or add custom functionality to your registries.

A registries prototype should define:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registry's

@phated
Copy link
Member

phated commented Feb 26, 2015

This is amazing!!!!!! Just a couple of nits. Thank you so so so so so much for putting the time to write this up.

@dinoboff dinoboff force-pushed the dinoboff-registry-doc branch 2 times, most recently from 523aa59 to d3a4b82 Compare February 26, 2015 18:40
@dinoboff
Copy link
Contributor Author

@phated You're welcome. Thanks for all your work.

@phated phated merged commit 3f67a70 into gulpjs:master Feb 26, 2015
@phated
Copy link
Member

phated commented Feb 26, 2015

❤️ I was dreading writing these. Thanks again

@dinoboff dinoboff deleted the dinoboff-registry-doc branch February 26, 2015 19:22
console.log('Server bind to ' + this.bindTo);
console.log('Serving' + this.build);
cb();
}))
Copy link
Contributor Author

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'

Copy link
Contributor Author

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

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

Successfully merging this pull request may close these issues.

Document custom registries
2 participants