Overview

A module package is simply a collection of one or more Modules.

The basic principle is that there's a main.json at the Module Package root and then each Module and it's assets exists in their own sub-folder.

When you load a Module Package into Somiibo, it looks at the main.json to know about which Modules are in the package.

Module Package File Structure

my-module-package
  • my-module-1
    • module.js - Logic that controls the module itself
    • settings.html - User interface for the module's settings
    • settings.js - Logic that controls any custom settings.html behavior
    • settings.json - Defaults, min, max, and more for the module's settings
  • ... - Additional individual module folders exist on this level (same contents as my-module-1)
  • main.json - Defines data about the package as a whole and each individual module

Boilerplate

In this example, we have defined one module in main.json with name = module-1.