The api is built up in lib/runners
.
Available event filters
are: nodes
, types
, contentids
, system
.
// Event examples
grasshopper.core.event.channel('/type/*')
.on('save', function(kontx, next) {
memoize.clearCache();
next();
});
grasshopper.core.event.channel('/type/' + constants.ids.recipes)
.on('parse', function(payload, next) {
// do stuff
next();
});
grasshopper.core.event.channel('/system/db')
.on('start', function(payload, next){
logger.debug('starting grasshopper');
next();
});