MINERVA
Platform Documentation

Plugin JavaScript API#

Introduction#

There is possibility to create JavaScript plugins for minerva. Tutorial on how to create plugins can be found in the minerva starter kit repository. Here we provide only documentation for the JavaScript API.

Registering with Minerva#

When the plugin is loaded into Minerva minervaDefine function is called, so this needs to be present in every plugin script. This function needs to return an object with methods that minerva will call to interact with plugin. List of all available methods can be found here.

Below you can find sample plugin:

minervaDefine(function () {
  return {
    register: function (minervaObject) {
      console.log("registering test plugin");
    },
    unregister: function () {
      console.log("unregistering test plugin");
    },
    getName: function () {
      return "test plugin";
    },
    getVersion: function () {
      return "0.0.1";
    }
  };
})

plugin methods that should be exposed to minerva#

minervaObject#

minervaObject contains following properties:

Project data#

project contains following properties:

Configuration#

configuration contains following properties:

Server side plugin data#

pluginData structure allows you to set/get some data on the server side. Here are methods that allows it: