Configuration
The config.json file we will create lays the basic foundation of out plugin, its name, author, description etc.
Last updated
The config.json file we will create lays the basic foundation of out plugin, its name, author, description etc.
Last updated
Check the 'Advanced/ Config' page for a more in-depth look at what exactly the config.json
file is, and a description of the attributes.
With the hello-plugin created within our HollaEx Kit folder, we can start building theconfig.json
file with all the basic information needed, good idea here to get out your IDE of choice.
Create a file namedconfig.json
inside the server/
directory of the newly-created hello-plugin plugin.
Copy and paste the following code into this newly created file:
And that's all for what we need to do on this page!
Continue onto the next step, or read below for a bit more understanding of what this new config.json is actually doing.
Looking at the interesting bits of the config.json we can see what we have actually defined.
Check the list on this page, for full definitions of each element
The top part of the code we see above is fairly simple. We have defined the name, version, and author of the plugin (hello-plugin, on version 1, written by 'You'), as well as created its bio - a quick description, and the description - a more detailed description seen on the plugins page.
Documentation, logo, icon, and url are all set to null at the moment so we will ignore them for now.
Moving to the next code chunk, we find public-meta
and meta
.
Again for a more in-depth view of what these are, check the main config page. Bothpublic-meta
and meta
are core aspects of plugins, so it's good to have a solid understanding of them.
For hello-plugin, we have one object within both public-meta
and meta
, public-message
and private_message
respectively, both being fairly similar.
type
: This defines the (surprisingly) type of the object, out of four allowed types (number
, string
, boolean
, and date-time
). In hello-plugin, both public-meta
and meta objects
will be strings
required
: Neither of these values are strictly required for hello-plugin to run
description
is the description of the values, here we are reminded that public-meta
is not a secret and meta
is a secret object.
value
: Here we find the strings our plugin will actually use. We will see these values actually on the exchange in the appropriate places later.
At the end of our code, we have the prescript
and postscript
. In hello-plugin all that will be installed is the hello-world-npm
package before the plugin is live.