Skip to content

mawaha/module-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

module-sandbox

Description

A library agnostic module/plugin framework. Register modules. Selectively initialise them. Pass in options. Interact with module apis in sandbox.

Instructions

  1. Registering a module
CC.registerModule("myModuleName", function(){
  var doSomethingAwesome = function(){
    console.log("Awesomeness!");
  };

  return {
    doSomethingAwesome: doSomethingAwesome
  };
});
  1. Initialising modules

CC(scope, modules, sandbox);

CC.(document, "myModuleName", function(myModuleName){
  myModuleName.doSomethingAwesome();
});

Releases

No releases published

Packages

No packages published