Skip to content

Commit

Permalink
docs: add notes to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch committed Feb 26, 2023
1 parent 8b65dff commit d79a7c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/api/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,10 @@ const editor = new Editor({
})
```

You can easily bootstrap a new extension via our CLI.

```bash
npm init tiptap-extension
```

Learn [more about custom extensions in our guide](/guide/custom-extensions).
7 changes: 7 additions & 0 deletions docs/guide/custom-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,5 +649,12 @@ const CustomExtension = Extension.create({
})
```

## Creating and publishing standalone extensions

If you want to create and publish your own extensions for Tiptap, you can use our CLI tool to bootstrap your project.
Simply run `npm init tiptap-extension` and follow the instructions. The CLI will create a new folder with a pre-configured project for you including a build script running on rollup.

If you want to test your extension locally, you can run `npm link` in the project folder and then `npm link YOUR_EXTENSION` in your project (for example a vite app).

## Sharing
When everything is working fine, don’t forget to [share it with the community](https://github.com/ueberdosis/tiptap/issues/819).

0 comments on commit d79a7c9

Please sign in to comment.