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 which maps keys register, unregister, getName and getVersion to the corresponding functions. Register function has single argument being the Minerva object which can then later be used to interact with the map.

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

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: