From 0f3151edb6f4772aaa8a249a85a42183384c2e3a Mon Sep 17 00:00:00 2001 From: erikkemperman Date: Wed, 21 Oct 2015 16:49:35 +0200 Subject: [PATCH] Docs: Align API with undertaker docs --- docs/API.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/API.md b/docs/API.md index cf3c2071a..7179223bb 100644 --- a/docs/API.md +++ b/docs/API.md @@ -737,7 +737,7 @@ To build your own custom registry see the [undertaker documentation on custom re #### registry -A registry instance or constructor. When passed in, the tasks from the current registry will be transferred to the new registry and then current registry will be replaced with the new registry. +A registry instance. When passed in, the tasks from the current registry will be transferred to the new registry and then current registry will be replaced with the new registry. #### Example @@ -765,16 +765,18 @@ var DefaultRegistry = require('undertaker-registry'); function MyCompanyTasksRegistry() { DefaultRegistry.call(this); +} +util.inherits(MyCompanyTasksRegistry, DefaultRegistry); - this.set('clean', function(done) { +MyCompanyTasksRegistry.prototype.init = function(gulp) { + gulp.task('clean', function(done) { done(); }); - this.set('someCompanyTask', function(done) { + gulp.task('someCompanyTask', function(done) { console.log('performing some company task.'); done(); }); -} -util.inherits(MyCompanyTasksRegistry, DefaultRegistry); +}; module.exports = new MyCompanyTasksRegistry(); ```