📁 Docs
Script it

Script plugin

The whole script to build the example below is available here. Open .neo files with a text editor of your choice.

Plugin

add plugin name:"Tutorial Simple Plugin"
update plugin about:"Neome Simple plugin" pluginVersion:"Version 1.0"

1. Variables

ensure variable DemoPluginPackageName kind:"Text"
update variable DemoPluginPackageName value:"neome.plugin.demo_plugin"

2. Forms

a. FormTwoNumberInput

ensure form FormTwoNumberInput
ensure section Details
ensure field Number1 type:"number"
ensure field Number2 type:"number"

b. FormMathOperationOutput

ensure form FormMathOperationOutput
ensure section Details
ensure field Result type:"number"

3. APIs

a. Add

// create Add API
 
ensure pluginApi Add type:"get"
update pluginApi Add inputForm:"FormTwoNumberInput" outputForm:"FormMathOperationOutput"

b. GetTree

// create GetTree API
 
ensure pluginApi GetTree type:"get"
update pluginApi GetTree outputForm:"$FormPickTree"

c. GetOptionValues

// create GetOptionValues API
 
ensure pluginApi GetOptionValues type:"get"
update pluginApi GetOptionValues outputForm:"$FormMapOfOptions"

4. Plugin Resources

ensure pluginResource type:"jar"
 
//You will have to upload a jar file after this step
 
update pluginResource type:"jar" packageNameVar:"DemoPluginPackageName"

Deploy

// deploy plugin
deploy Plugin