Skip to content

Commit 3a9301c

Browse files
committed
Merge pull request #6 from apibyexample/nick/callback-readme
Add Callback info to README
2 parents 5638bfe + b8565e3 commit 3a9301c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,22 @@ To execute you would then need to run
9898
``node createFeeds.js``
9999

100100
A suggestion would be to add this to your ``package.json`` as a script command.
101+
102+
### Callbacks
103+
104+
If you'd like to fire a callback on completion, you can pass a function as a
105+
second argument like so:
106+
107+
```js
108+
var createFeeds = require('abe-json-builder'),
109+
callback = function () {
110+
console.log('I am called on complete');
111+
},
112+
options = {
113+
'verbose': false,
114+
'location': 'myApp/mocks/**/*',
115+
'build': 'www/dist/json/'
116+
};
117+
118+
createFeeds.jsonBuilder(options, callback);
119+
```

0 commit comments

Comments
 (0)