view doc/procs/10.new-plugin.md @ 45:aa205621d7d6

Plugin history: add command keyword, #392
author David Demelier <markand@malikania.fr>
date Mon, 29 Feb 2016 13:11:58 +0100
parents 1158cffe5a5e
children
line wrap: on
line source

Writing new plugin
==================

This procedure let you bundle a new plugin within irccd.

1. Create the plugin directory in plugins/plugin-name.

2. Write the plugin JavaScript file

The plugin file must be named exactly the same as the directory name plus the .js suffix.

Example:

- plugins/myplugin/myplugin.js

3. Fill the plugin information.

The plugin must have the **info** table set, see other plugins for example.

````javascript
info = {
	author: "Firstname Lastname <email>",
	license: "Your license",
	summary: "Short summary without period",
	version: "The version"
};
````

If the plugin is intended to be bundled with irccd, license must be set to **ISC** and the version to **@IRCCD_VERSION@**.

3. Write the documentation file

Just like the JavaScript file, it must be named the same plus the .md suffix.

Example:

- plugins/myplugin/myplugin.md

Document your plugin using markdown, see other plugins and try to be as close as possible.

4. Update cmake/IrccdVersion.cmake

Add the canonical plugin name to the **IRCCD_PLUGINS** variable, that's it.

Note: please keep the variable ordered.