@tiptap/cli 3.19.5 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/LICENSE.sass +1692 -0
- package/dist/index.js +48 -45
- package/dist/index.js.map +1 -1
- package/dist/sass.cjs +413 -0
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -3,3 +3,31 @@
|
|
|
3
3
|
The Tiptap CLI helps you scaffold [editors](https://tiptap.dev/docs/ui-components/templates/simple-editor), install [UI components](https://tiptap.dev/docs/ui-components/components/overview) or primitives, and configure Tiptap faster. It removes much of the manual work so you can start building editor features faster.
|
|
4
4
|
|
|
5
5
|
To use it, head over to the [documentation](https://tiptap.dev/docs/ui-components/getting-started/cli).
|
|
6
|
+
|
|
7
|
+
## Create a Next.js editor
|
|
8
|
+
|
|
9
|
+
Run this command from the directory that will contain the project. The CLI uses Next.js's empty starter so the root layout can build without downloading fonts. The CLI creates `my-app` and installs Simple Editor at `/simple`.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm dlx @tiptap/cli init simple-editor --framework next --name my-app --defaults
|
|
13
|
+
cd my-app
|
|
14
|
+
pnpm build
|
|
15
|
+
pnpm start
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Inspect an installation
|
|
19
|
+
|
|
20
|
+
Search the public index and inspect an item before choosing a project. `view --source` retrieves the source files and checks access to paid items.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pnpm dlx @tiptap/cli search image --type node
|
|
24
|
+
pnpm dlx @tiptap/cli view simple-editor --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
From the project directory, preview the files and dependencies that `add` would change. Pass a destination path to `--diff` to see the edits to one file. Press Enter at an overwrite prompt to keep your local file.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pnpm dlx @tiptap/cli add simple-editor --dry-run
|
|
31
|
+
pnpm dlx @tiptap/cli add simple-editor --diff app/simple/page.tsx
|
|
32
|
+
pnpm dlx @tiptap/cli info --json
|
|
33
|
+
```
|