8000 Docs: Align API with undertaker docs · gulpjs/gulp@0f3151e · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 0f3151e

Browse files
erikkempermanphated
authored andcommitted
Docs: Align API with undertaker docs
1 parent bc352dd commit 0f3151e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/API.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ To build your own custom registry see the [undertaker documentation on custom re
737737

738738
#### registry
739739

740-
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.
740+
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.
741741

742742
#### Example
743743

@@ -765,16 +765,18 @@ var DefaultRegistry = require('undertaker-registry');
765765

766766
function MyCompanyTasksRegistry() {
767767
DefaultRegistry.call(this);
768+
}
769+
util.inherits(MyCompanyTasksRegistry, DefaultRegistry);
768770

769-
this.set('clean', function(done) {
771+
MyCompanyTasksRegistry.prototype.init = function(gulp) {
772+
gulp.task('clean', function(done) {
770773
done();
771774
});
772-
this.set('someCompanyTask', function(done) {
775+
gulp.task('someCompanyTask', function(done) {
773776
console.log('performing some company task.');
774777
done();
775778
});
776-
}
777-
util.inherits(MyCompanyTasksRegistry, DefaultRegistry);
779+
};
778780

779781
module.exports = new MyCompanyTasksRegistry();
780782
```

0 commit comments

Comments
 (0)
0