Skip to content

Commit afee8f6

Browse files
committed
docs: Standardize package installation
- Add @fedify/sqlite to VitePress config references - Reorganize CLI installation with separate tabs for different platforms - Standardize package manager examples (npm, pnpm, yarn, bun, deno) - Add installation instructions for framework integration packages - Replace GitHub links with JSR documentation links - Improve formatting and organization across documentation
1 parent 8e4bd2e commit afee8f6

File tree

7 files changed

+270
-36
lines changed

7 files changed

+270
-36
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const REFERENCES = {
9090
{ text: "@fedify/h3", link: "https://jsr.io/@fedify/h3/doc" },
9191
{ text: "@fedify/postgres", link: "https://jsr.io/@fedify/postgres/doc" },
9292
{ text: "@fedify/redis", link: "https://jsr.io/@fedify/redis/doc" },
93+
{ text: "@fedify/sqlite", link: "https://jsr.io/@fedify/sqlite/doc" },
9394
{ text: "@fedify/testing", link: "https://jsr.io/@fedify/testing/doc" },
9495
],
9596
};

docs/cli.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ the following command:
2424

2525
::: code-group
2626

27-
~~~~ sh [Node.js]
27+
~~~~ sh [npm]
2828
npm install -g @fedify/cli
2929
~~~~
3030

@@ -66,19 +66,25 @@ command:
6666

6767
::: code-group
6868

69-
~~~~ sh [Linux/macOS]
69+
~~~~ sh [Linux]
7070
deno install \
71-
-g \
72-
-A \
71+
-gA \
72+
--unstable-fs --unstable-kv --unstable-temporal \
73+
-n fedify \
74+
jsr:@fedify/cli
75+
~~~~
76+
77+
~~~~ sh [macOS]
78+
deno install \
79+
-gA \
7380
--unstable-fs --unstable-kv --unstable-temporal \
7481
-n fedify \
7582
jsr:@fedify/cli
7683
~~~~
7784

7885
~~~~ powershell [Windows]
7986
deno install `
80-
-g `
81-
-A `
87+
-gA `
8288
--unstable-fs --unstable-kv --unstable-temporal `
8389
-n fedify `
8490
jsr:@fedify/cli

docs/install.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,24 @@ following instructions:
1919

2020
::: code-group
2121

22-
~~~~ sh [Node.js]
22+
~~~~ sh [npm]
2323
npm install -g @fedify/cli
2424
~~~~
2525

26-
~~~~ sh [Bun]
27-
bun install -g @fedify/cli
26+
~~~~ sh [Homebrew (Linux/macOS)]
27+
brew install fedify
2828
~~~~
2929

3030
~~~~ powershell [Scoop (Windows)]
3131
scoop install fedify
3232
~~~~
3333

34+
~~~~ sh [Bun]
35+
bun install -g @fedify/cli
36+
~~~~
37+
3438
~~~~ sh [Deno]
35-
deno install -g -A --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli
39+
deno install -gA --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli
3640
~~~~
3741

3842
:::
@@ -114,18 +118,30 @@ Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js
114118
22.0.0 or later installed on your system. Then you can install Fedify via
115119
the following command:
116120

117-
~~~~ sh
121+
::: code-group
122+
123+
~~~~ sh [npm]
118124
npm add @fedify/fedify
119125
~~~~
120126

127+
~~~~ sh [pnpm]
128+
pnpm add @fedify/fedify
129+
~~~~
130+
131+
~~~~ sh [Yarn]
132+
yarn add @fedify/fedify
133+
~~~~
134+
135+
:::
136+
121137
Fedify is an ESM-only package, so you need to add `"type": "module"` to the
122138
*package.json* file:
123139

124140
~~~~ json{2}
125141
{
126142
"type": "module",
127143
"dependencies": {
128-
"@fedify/fedify": "^1.1.0"
144+
"@fedify/fedify": "^1.8.1"
129145
}
130146
}
131147
~~~~

docs/manual/integration.md

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,33 @@ Express
7373
-------
7474

7575
[Express] is a fast, unopinionated, minimalist web framework for Node.js.
76-
The [@fedify/express] package provides a middleware to integrate Fedify with
76+
The *@fedify/express* package provides a middleware to integrate Fedify with
7777
Express:
7878

79+
::: code-group
80+
81+
~~~~ sh [Deno]
82+
deno add jsr:@fedify/express
83+
~~~~
84+
85+
~~~~ sh [npm]
86+
npm add @fedify/express
87+
~~~~
88+
89+
~~~~ sh [pnpm]
90+
pnpm add @fedify/express
91+
~~~~
92+
93+
~~~~ sh [Yarn]
94+
yarn add @fedify/express
95+
~~~~
96+
97+
~~~~ sh [Bun]
98+
bun add @fedify/express
99+
~~~~
100+
101+
:::
102+
79103
~~~~ typescript twoslash
80104
// @noErrors: 2345
81105
import express from "express";
@@ -94,7 +118,6 @@ app.use(integrateFederation(federation, (req) => "context data goes here")); //
94118
~~~~
95119

96120
[Express]: https://expressjs.com/
97-
[@fedify/express]: https://github.com/fedify-dev/express
98121

99122

100123
Hono
@@ -127,7 +150,31 @@ h3
127150

128151
[h3] is an HTTP server framework behind [Nitro], [Analog], [Vinxi],
129152
[SolidStart], [TanStack Start], and other many web frameworks.
130-
The [@fedify/h3] package provides a middleware to integrate Fedify with h3:
153+
The *@fedify/h3* package provides a middleware to integrate Fedify with h3:
154+
155+
::: code-group
156+
157+
~~~~ sh [Deno]
158+
deno add jsr:@fedify/h3
159+
~~~~
160+
161+
~~~~ sh [npm]
162+
npm add @fedify/h3
163+
~~~~
164+
165+
~~~~ sh [pnpm]
166+
pnpm add @fedify/h3
167+
~~~~
168+
169+
~~~~ sh [Yarn]
170+
yarn add @fedify/h3
171+
~~~~
172+
173+
~~~~ sh [Bun]
174+
bun add @fedify/h3
175+
~~~~
176+
177+
:::
131178

132179
~~~~ typescript {9-15} twoslash
133180
// @noErrors: 2345
@@ -162,7 +209,6 @@ app.use(router);
162209
[Vinxi]: https://vinxi.vercel.app/
163210
[SolidStart]: https://start.solidjs.com/
164211
[TanStack Start]: https://tanstack.com/start
165-
[@fedify/h3]: https://github.com/fedify-dev/h3
166212

167213

168214
Fresh
@@ -230,9 +276,29 @@ NestJS
230276
231277
[NestJS] is a modular, versatile, and scalable framework for building efficient,
232278
reliable, and scalable server-side applications with Node.js and TypeScript.
233-
The [@fedify/nestjs] package provides a middleware to integrate Fedify with
279+
The *@fedify/nestjs* package provides a middleware to integrate Fedify with
234280
NestJS:
235281

282+
::: code-group
283+
284+
~~~~ sh [npm]
285+
npm add @fedify/nestjs
286+
~~~~
287+
288+
~~~~ sh [pnpm]
289+
pnpm add @fedify/nestjs
290+
~~~~
291+
292+
~~~~ sh [Yarn]
293+
yarn add @fedify/nestjs
294+
~~~~
295+
296+
~~~~ sh [Bun]
297+
bun add @fedify/nestjs
298+
~~~~
299+
300+
:::
301+
236302
~~~~ typescript [modules/federation/federation.service.ts] twoslash
237303
import { Injectable, Inject, OnModuleInit } from '@nestjs/common';
238304
import {

docs/manual/kv.md

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,32 @@ const federation = createFederation<void>({
4545

4646
### `SqliteKvStore`
4747

48-
> [!NOTE]
49-
> The [`SqliteKvStore`] class is available in the *@fedify/sqlite* package.
48+
To use the [`SqliteKvStore`], you need to install the *@fedify/sqlite* package
49+
first:
50+
51+
::: code-group
52+
53+
~~~~ bash [Deno]
54+
deno add jsr:@fedify/sqlite
55+
~~~~
56+
57+
~~~~ bash [npm]
58+
npm add @fedify/sqlite
59+
~~~~
60+
61+
~~~~ bash [pnpm]
62+
pnpm add @fedify/sqlite
63+
~~~~
64+
65+
~~~~ bash [Yarn]
66+
yarn add @fedify/sqlite
67+
~~~~
68+
69+
~~~~ bash [Bun]
70+
bun add @fedify/sqlite
71+
~~~~
72+
73+
:::
5074

5175
[`SqliteKvStore`] is a simple key–value store implementation that uses SQLite as
5276
the backend storage. It provides persistent storage with minimal configuration.
@@ -139,8 +163,32 @@ const federation = createFederation<void>({
139163

140164
### [`RedisKvStore`]
141165

142-
> [!NOTE]
143-
> The [`RedisKvStore`] class is available in the [@fedify/redis] package.
166+
To use the [`RedisKvStore`], you need to install the *@fedify/redis* package
167+
first:
168+
169+
::: code-group
170+
171+
~~~~ bash [Deno]
172+
deno add jsr:@fedify/redis
173+
~~~~
174+
175+
~~~~ bash [npm]
176+
npm add @fedify/redis
177+
~~~~
178+
179+
~~~~ bash [pnpm]
180+
pnpm add @fedify/redis
181+
~~~~
182+
183+
~~~~ bash [Yarn]
184+
yarn add @fedify/redis
185+
~~~~
186+
187+
~~~~ bash [Bun]
188+
bun add @fedify/redis
189+
~~~~
190+
191+
:::
144192

145193
[`RedisKvStore`] is a key–value store implementation that uses Redis as
146194
the backend storage. It provides scalability and high performance, making it
@@ -168,13 +216,36 @@ const federation = createFederation<void>({
168216
});
169217
~~~~
170218

171-
[@fedify/redis]: https://github.com/fedify-dev/redis
172219
[`RedisKvStore`]: https://jsr.io/@fedify/redis/doc/kv/~/RedisKvStore
173220

174221
### [`PostgresKvStore`]
175222

176-
> [!NOTE]
177-
> The [`PostgresKvStore`] class is available in the [@fedify/postgres] package.
223+
To use the [`PostgresKvStore`], you need to install the *@fedify/postgres*
224+
package first:
225+
226+
::: code-group
227+
228+
~~~~ bash [Deno]
229+
deno add jsr:@fedify/postgres
230+
~~~~
231+
232+
~~~~ bash [npm]
233+
npm add @fedify/postgres
234+
~~~~
235+
236+
~~~~ bash [pnpm]
237+
pnpm add @fedify/postgres
238+
~~~~
239+
240+
~~~~ bash [Yarn]
241+
yarn add @fedify/postgres
242+
~~~~
243+
244+
~~~~ bash [Bun]
245+
bun add @fedify/postgres
246+
~~~~
247+
248+
:::
178249

179250
[`PostgresKvStore`] is a key–value store implementation that uses PostgreSQL as
180251
the backend storage. It provides scalability and high performance, making it
@@ -204,7 +275,6 @@ const federation = createFederation<void>({
204275
~~~~
205276

206277
[`PostgresKvStore`]: https://jsr.io/@fedify/postgres/doc/kv/~/PostgresKvStore
207-
[@fedify/postgres]: https://github.com/fedify-dev/postgres
208278

209279
### `WorkersKvStore` (Cloudflare Workers only)
210280

docs/manual/log.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ To enable logging in your federated server app, you need to install the
3232
deno add jsr:@logtape/logtape
3333
~~~~
3434

35-
~~~~ sh [Node.js]
35+
~~~~ sh [npm]
3636
npm add @logtape/logtape
3737
~~~~
3838

39+
~~~~ sh [pnpm]
40+
pnpm add @logtape/logtape
41+
~~~~
42+
43+
~~~~ sh [Yarn]
44+
yarn add @logtape/logtape
45+
~~~~
46+
3947
~~~~ sh [Bun]
4048
bun add @logtape/logtape
4149
~~~~

0 commit comments

Comments
 (0)