1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/packages/app-cli/tests/support/plugins/post_messages
2024-05-07 10:59:06 +01:00
..
api Doc: Fix plural of parenthesis (#10405) 2024-05-07 10:59:06 +01:00
src Mobile: Plugins: Fix API incompatibility in arguments to onMessage listeners in panels (#10375) 2024-04-25 23:04:24 +01:00
.gitignore Plugins: Updated types 2021-01-13 12:17:54 +00:00
.npmignore Plugins: Updated types 2021-01-13 12:17:54 +00:00
GENERATOR_DOC.md Doc: Updated doc and tests for plugin postMessage() update 2021-01-11 23:34:06 +00:00
package-lock.json Doc: Updated doc and tests for plugin postMessage() update 2021-01-11 23:34:06 +00:00
package.json Update plugin types 2023-01-05 10:41:17 +00:00
plugin.config.json Doc: Updated doc and tests for plugin postMessage() update 2021-01-11 23:34:06 +00:00
README.md Doc: Updated doc and tests for plugin postMessage() update 2021-01-11 23:34:06 +00:00
tsconfig.json Desktop: Resolves #8080: Add support for plugin user data (#8312) 2023-06-13 18:06:16 +01:00
webpack.config.js Update plugin types 2023-01-05 10:41:17 +00:00

Joplin Plugin

This is a template to create a new Joplin plugin.

The main two files you will want to look at are:

  • /src/index.ts, which contains the entry point for the plugin source code.
  • /src/manifest.json, which is the plugin manifest. It contains information such as the plugin a name, version, etc.

Building the plugin

The plugin is built using Webpack, which creates the compiled code in /dist. A JPL archive will also be created at the root, which can use to distribute the plugin.

To build the plugin, simply run npm run dist.

The project is setup to use TypeScript, although you can change the configuration to use plain JavaScript.

Updating the plugin framework

To update the plugin framework, run npm run update.

In general this command tries to do the right thing - in particular it's going to merge the changes in package.json and .gitignore instead of overwriting. It will also leave "/src" as well as README.md untouched.

The file that may cause problem is "webpack.config.js" because it's going to be overwritten. For that reason, if you want to change it, consider creating a separate JavaScript file and include it in webpack.config.js. That way, when you update, you only have to restore the line that include your file.