1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-30 08:26:59 +02:00
joplin/packages/plugins/ToggleSidebars
Laurent Cozic 47f95cb294
Chore: Implement cSpell to detect spelling mistakes in codebase (#10001)
Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
2024-02-26 10:16:23 +00:00
..
api Chore: Implement cSpell to detect spelling mistakes in codebase (#10001) 2024-02-26 10:16:23 +00:00
src Plugin Repo: Add link to plugin commit in commit message 2021-01-27 23:57:08 +00:00
.gitignore Chore: SideBar => Sidebar 2021-01-12 12:28:55 +00:00
.npmignore Chore: SideBar => Sidebar 2021-01-12 12:28:55 +00:00
GENERATOR_DOC.md Plugin Repo: Add link to plugin commit in commit message 2021-01-27 23:57:08 +00:00
package-lock.json Plugin Repo: Add link to plugin commit in commit message 2021-01-27 23:57:08 +00:00
package.json Tools: Also pin dev dependencies 2022-11-05 14:52:40 +00:00
plugin.config.json Plugin Repo: Add link to plugin commit in commit message 2021-01-27 23:57:08 +00:00
README.md Chore: SideBar => Sidebar 2021-01-12 12:28:55 +00:00
tsconfig.json Chore: SideBar => Sidebar 2021-01-12 12:28:55 +00:00
webpack.config.js Tools: Enable eslint rule comma-dangle: always-multiline for functions 2023-08-22 11:58:53 +01: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 yo joplin --update

Keep in mind that doing so will overwrite all the framework-related files outside of the "src/" directory (your source code will not be touched). So if you have modified any of the framework-related files, such as package.json or .gitignore, make sure your code is under version control so that you can check the diff and re-apply your changes.

For that reason, it's generally best not to change any of the framework files or to do so in a way that minimises the number of changes. For example, if you want to modify the Webpack config, create a new 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.