Skip to content

Creating the base

DeerisLeGris edited this page Jan 9, 2018 · 8 revisions

Creating the base of your module

Introduction

Firstly, you need to know the Javascript and a little bit the JSON for create modules (and HTML/CSS for create UI).

And secondly, you need to choose what type of module you want to create and then, click on him for know how to create him:

  • Theme
  • Addon
  • Compilator (not available currently)
  • Code editor language (not available currently)
  • Translation (not available currently)

Type of modules

Theme

  • Create folder for your module files in your computer

  • Create the files "infos.json" and "theme.json" in the folder like this:

  • Add this content in the "infos.json" file and modify it:

{
  "GUID": "GUID_key_here",

  "ModuleName": "Theme name",
  "ModuleAuthor": "Author name",
  "ModuleDescription": "Module description",
  "ModuleWebsiteLink": "http://www.qwant.fr",
  "ModuleType": 1,
  "SceMinimalVersionRequired": 1.0,
  
  "ModuleVersion":
  {
      "Major": 1,
      "Minor": 0,
      "Revision": 0
  }
}

GUID: a unique identifier key for your module (useful for update your module in the editor). You can generate your GUID here -> https://www.guidgenerator.com

ModuleName: name of your module

ModuleAuthor: your name or nickname, whatever !

ModuleDescription: description of your module

ModuleWebsiteLink: link for access to the website of your module (or just clear the string if you don't have website)

ModuleType = 1: defined your module as a theme (so don't touch at this value)

SceMinimalVersionRequired: the minimal version of Serris Code Editor required for your module work correctly (you going to see in the documentation or in the tutorial the minimal version required for access to a certain function)

ModuleVersion: version of your module


Addon

  • Create folder for your module files in your computer

  • Create the files "infos.json" and "main.js" in the folder like this:

  • Add this content in the "infos.json" file and modify it:

{
  "GUID": "GUID_key_here",

  "ModuleName": "Addon name",
  "ModuleAuthor": "Author name",
  "ModuleDescription": "Module description",
  "ModuleWebsiteLink": "http://www.qwant.fr",
  "ModuleType": 0,
  "SceMinimalVersionRequired": 1.0,
  "CanBePinnedToToolBar": true,
  
  "ModuleVersion":
  {
      "Major": 1,
      "Minor": 0,
      "Revision": 0
  },

  "JSFilesPathList" : []
}

GUID: a unique identifier key for your module (useful for update your module in the editor). You can generate your GUID here -> https://www.guidgenerator.com

ModuleName: name of your module

ModuleAuthor: your name or nickname, whatever !

ModuleDescription: description of your module

ModuleWebsiteLink: link for access to the website of your module (or just clear the string if you don't have website)

ModuleType = 0: defined your module as a addon (so don't touch at this value)

SceMinimalVersionRequired: the minimal version of Serris Code Editor required for your module work correctly (you going to see in the documentation or in the tutorial the minimal version required for access to a certain function)

CanBePinnedToToolBar: set true if you going to create a widget for your module (in the next part of the tutorial) or false if your module will be not have widget

ModuleVersion: version of your module

JSFilesPathList: string array for add the paths of JavaScript files of your module (in the order of their execution)

  • Now it's time to create your addon !

Clone this wiki locally