@notionhq/custom-blocks 0.1.10 → 0.1.11
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 +5 -1
- package/dist/version.js +1 -1
- package/docs/deployment.md +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,11 @@ the workspace. React is optional unless the block imports
|
|
|
15
15
|
`@notionhq/custom-blocks/react`. React blocks need `react` and `react-dom`.
|
|
16
16
|
|
|
17
17
|
For local preview, run `ntn customblocks dev` from the worker project, then
|
|
18
|
-
open `http://localhost:9873`.
|
|
18
|
+
open `http://localhost:9873`. Install
|
|
19
|
+
[`@notionhq/custom-blocks-dev-shell`](https://www.npmjs.com/package/@notionhq/custom-blocks-dev-shell)
|
|
20
|
+
as a devDependency to pin the shell and get its reference docs in
|
|
21
|
+
`node_modules`; see [`docs/deployment.md`](./docs/deployment.md) for how local
|
|
22
|
+
serving works.
|
|
19
23
|
|
|
20
24
|
## Quick start
|
|
21
25
|
|
package/dist/version.js
CHANGED
package/docs/deployment.md
CHANGED
|
@@ -11,6 +11,8 @@ For a self-hosted block, the sandbox can propose the initial manifest in `connec
|
|
|
11
11
|
|
|
12
12
|
## Self-hosted blocks (localhost fallback)
|
|
13
13
|
|
|
14
|
+
For everyday local development you usually don't need to wire this up yourself: `ntn customblocks dev` runs the custom blocks dev shell, which serves the worker's blocks this way and renders them in a mock Notion host at http://localhost:9873.
|
|
15
|
+
|
|
14
16
|
During development, a Notion host can point a custom block at a local dev server instead of a deployed worker. The block describes itself with an optional `custom_blocks.json` at the bundle root:
|
|
15
17
|
|
|
16
18
|
```json
|