flosse / scaleApp

scaleApp is a JavaScript framework for scalable and maintainable One-Page-Applications

Home Page:http://www.scaleapp.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

init method for plugins

flosse opened this issue · comments

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
  };

});