# Plugin Manifest: plugin.json
Every Sisense Add-on is defined via a manifest file called plugin.json located in the root directory of the Add-on.
This file determines how the Add-on's code is processed and loaded into the Sisense web application.
# Versions
Sisense currently has 3 Add-on infrastructure versions:
| Version | Available From | Comments |
|---|---|---|
1 | Sisense v5.0 | Original Add-ons. Many existing community Add-on still use this version. |
2 | Sisense v7.0 | Added support for ES2015 using babel.js |
3 | Sisense v8.1 | Module-based design |
Each version has a slightly different structure/format for plugin.json. They are described below.
# File Format Reference
# Sisense Add-on Infra V1
Properties
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
name | string | Yes | Unique Add-on name | pluginName |
pluginInfraVersion | number | Yes | Add-on infrastructure version: 1 | 1 |
isEnabled | boolean | no | Turns the Add-on on or off | true |
source | string[] | Yes | List of all the Add-on's .js JavaScript source files | ['index.js'] |
style | string[] | Yes | List of all the Add-on's .css CSS source files | ['main.css'] |
Example
{
"name": "pluginName",
"pluginInfraVersion": 1,
"isEnabled": true,
"source": [
"index.js",
"functions.js"
],
"style": [
"main.css",
"main-ie.css"
]
}
# Sisense Add-on Infra V2
Properties
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
name | string | Yes | Unique Add-on name | pluginName |
pluginInfraVersion | number | Yes | Add-on infrastructure version: 2 | 2 |
isEnabled | boolean | no | Turns the Add-on on or off | true |
source | string[] | Yes | List of all the Add-on's .js JavaScript source files | ['index.6.js'] |
style | string[] | Yes | List of all the Add-on's .css CSS source files | ['main.css'] |
ES2015 Support
This version introduced support for ES6/ES2015 using babel.js. However, JavaScript files do not automatically get processed by Babel!
To have a file go through Babel, use the extension .6.js for example, instead of index.js use index.6.js. This extension needs to be used both in the actual file name and in the source property of the plugin.json file.
Example
{
"name": "pluginName",
"pluginInfraVersion": 2,
"isEnabled": true,
"source": [
"index.js",
"functions.6.js"
],
"style": [
"main.css",
"main-ie.css"
]
}
# Sisense Add-on Infra V3
Properties
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
name | string | Yes | Unique Add-on name | pluginName |
pluginInfraVersion | number | Yes | Add-on infrastructure version: 3 | 3 |
isEnabled | boolean | no | Turns the Add-on on or off | true |
main | string | Yes | The main .js JavaScript source file, containing the module's entry point | 'index.js' |
Example
{
"name": "addButtons",
"pluginInfraVersion": 3,
"isEnabled": true,
"main": "main.js"
}