Skip to content

Instantly share code, notes, and snippets.

@bmeck
Created September 19, 2012 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmeck/3750674 to your computer and use it in GitHub Desktop.
Save bmeck/3750674 to your computer and use it in GitHub Desktop.
exports.attach = function () {
var haibu = this;
haibu.on(['spawn','begin'], function (lvl, data) {
data.drone.on('message', onMessage.bind(null, data.pkg));
});
function onMessage(pkg, info) {
if (info.event === 'port' && haibu.config.get('webhook')) {
// do things
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment