There was an error while loading. Please reload this page.
Note: Plugins in v2.X works slight different compared to v1.X.
👉 Sample plugin
Create the project folder in your .graviton2/plugins.
Create the plugin folder, you can name it as you wish.
mkdir SamplePlugin
Go inside it.
cd SamplePlugin
Now, let's create our package.json ( You can use npm init if you wish.)
npm init
Example:
{ "name": "SamplePlugin", "id": "sample-plugin", "main" :"main.js", }
Create the main file in the root folder.
touch main.js
Paste this code in the main.js:
main.js
function entry(API){ new API.Notification({ title: 'A cool notification!', content: 'Some content :)' }) } module.exports = { entry }
What is this code doing?
Documentation
Tutorials
Contributing
About