Skip to content

Commit d81a88d

Browse files
committed
[DOC] Update doc with pluginHelper example
1 parent 3dbc299 commit d81a88d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ module.exports = {
3434
},
3535
requiredConfig: ['awesomeApiKey'], // throw an error if this is not configured
3636

37+
// return an object from here to add functionality to the `pluginHelper`
38+
// that is passed in to user defined config property functions
39+
pluginHelper: function(context) {
40+
return {
41+
sayHello: function() {
42+
return 'Hello' + context.project.name();
43+
}
44+
};
45+
},
46+
3747
// implement any hooks appropriate for your plugin
3848
willUpload: function(context) {
3949
// Use the `readConfig` method for uniform access to this plugin's config,

0 commit comments

Comments
 (0)