1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/generator-joplin/generators/app/templates
2021-01-30 14:54:02 +00:00
..
api Plugins: Add support for joplin.plugins.installationDir to allow accessing external files packaged with the plugin 2021-01-27 12:48:47 +00:00
src Doc: Updating to make it clear its a functioning plugin (#4420) 2021-01-30 14:54:02 +00:00
.gitignore_TEMPLATE Generator: Update plugin generator to handle requirements of coming plugin repository 2021-01-04 18:45:43 +00:00
.npmignore_TEMPLATE Generator: Update plugin generator to handle requirements of coming plugin repository 2021-01-04 18:45:43 +00:00
api_index.ts Plugins: Added support app_min_version property and made it required 2020-11-15 14:18:46 +00:00
GENERATOR_DOC.md Doc: Updated doc and tests for plugin postMessage() update 2021-01-11 23:34:06 +00:00
package_TEMPLATE.json Generator: Fixed issue that could result in an invalid JPL file 2021-01-13 12:16:36 +00:00
plugin.config.json Generator: Better handling of external scripts 2021-01-08 16:31:11 +00:00
README.md Generator: Added "npm run update" command 2021-01-05 21:59:16 +00:00
tsconfig.json Plugins: Added support app_min_version property and made it required 2020-11-15 14:18:46 +00:00
webpack.config.js Generator: Fixes #4360: Scripts were no longer being compiled 2021-01-15 17:03:38 +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.