init method for plugins
flosse opened this issue · comments
Markus Kohlhase commented
Markus Kohlhase commented
Its now part of the new plugin API:
core.use(function(core, done){
// define a method that gets called when a module starts
var onModuleInit = function(instanceSandbox, options, myCallback){
fooBarMethod(myCallback);
};
// define a method that gets called when a module stops
var onModuleDestroy = function(done){
myCleanUpMethod(function(){ done(); });
};
return {
init: onModuleInit,
destroy: onModuleDestroy
};
});