# joplin-plugin-cli

> A cli for joplin plugins, supports creating and packaging plugins, uses esbuild for the core, it's very **fast**.

Latest version **0.1.3** (published 2021-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install joplin-plugin-cli
pnpm add joplin-plugin-cli
yarn add joplin-plugin-cli
bun add joplin-plugin-cli
```

Provides the commands `jpl`, `joplin-plugin-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2021-10-20 |
| First published | 2021-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 22.9 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 316 |
| Maintainers | rxliuli |

## Links

- npm: https://www.npmjs.com/package/joplin-plugin-cli
- Repository: https://github.com/rxliuli/joplin-utils.git#master
- Homepage: https://github.com/rxliuli/joplin-utils/tree/master#readme
- Issues: https://github.com/rxliuli/joplin-utils/issues
- npm.io page: https://npm.io/package/joplin-plugin-cli

## Dependencies (2)

- [esbuild](https://npm.io/package/esbuild.md) ^0.12.28
- [@liuli-util/cli](https://npm.io/package/@liuli-util/cli.md) ^3.11.1

## Recent versions

- 0.1.3 (latest) — 2021-10-20
- 0.1.2 — 2021-09-21
- 0.1.1 — 2021-09-21
- 0.1.0 — 2021-09-21

## README

# joplin-plugin-cli

## Introduction

A cli for joplin plugins, supports creating and packaging plugins, uses esbuild for the core, it's very **fast**.

## Use

```sh
npm i -g joplin-plugin-cli ## install
jpl generate --name test-plugin # Generate the project
cd test-plugin
yarn build # build
```

## FAQ

### Motivation

Why not use the official plugin template project?

The front-end packaging tools have changed a lot lately, mainly due to the performance revolution caused by esbuild and swc (that's not an overstatement). vue authors abandoned webpack and built a new cross-framework tool called vite based on esbuild and rollup, so I also prefer to build faster tools based on esbuild.

> The official plugin template project takes about 3.87s to build using webpack, while this cli takes only 0.17s based on esbuild.
> ![diff](https://github.com/rxliuli/joplin-utils/raw/master/libs/joplin-plugin-cli/assets/diff.png)

## How to migrate existing plugins?

1. install dependencies

   ```sh
   yarn add -D joplin-plugin-api joplin-plugin-cli
   ```

2. Remove the `dist/prepare/update` command from _package.json_ and add the `dev/build` command

   ```json
   {
     "scripts": {
       "build": "jpl build",
       "dev": "jpl build -w"
     }
   }
   ```

3. Run the build command

   ```sh
   yarn build
   ```

4. replace all `import joplin from 'api'` with `import joplin from 'joplin-plugin-api'` in the code
5. Delete the `api` directory, `webpack.config.js`

## Reference

- [Performance comparison of packaging tools](https://esbuild.github.io/)
- [vscode officially recommends using esbuild packaging plugin](https://code.visualstudio.com/api/working-with-extensions/bundling-extension)

---
_Source: https://npm.io/package/joplin-plugin-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
