@@ -5,11 +5,10 @@ The NativeLink documentation gets deployed to <https://docs.nativelink.com>.
5
5
> [ !CAUTION]
6
6
> Setup for working on these docs differs between Linux and Mac.
7
7
>
8
- > For Linux: Use the Nix flake and run ` pnpm i ` .
8
+ > For Linux: Use the Nix flake and run ` bun install ` .
9
9
>
10
10
> For Mac: If you're in the Nix flake, exit it, for instance with `direnv
11
- > revoke` . Then manually install ` pnpm` , run ` pnpm i` and run ` pnpm exec
12
- > playwright install`.
11
+ > revoke` . Then manually install ` bun` , run ` bun install` and run ` bun preview`
13
12
>
14
13
> It's a long term goal to add the automated setup to Mac.
15
14
@@ -20,58 +19,55 @@ stack. Getting a bunch of bleeding-edge tools to work well together can be
20
19
challenging. Feel free to copy-paste it into your own projects.
21
20
22
21
- [ Diátaxis] ( https://diataxis.fr/ ) as overarching documentation philosophy.
23
- - [ Pnpm] ( https://github.com/pnpm/pnpm ) as production bundler.
24
- - [ Bun] ( https://github.com/oven-sh/bun ) as build-time TypeScript interpreter.
22
+ - [ Bun] ( https://github.com/oven-sh/bun ) as production bundler.
25
23
- [ Biome] ( https://biomejs.dev/ ) as linting toolchain.
26
24
- [ Astro] ( https://astro.build/ ) as meta-framework.
27
25
- [ Starlight] ( https://starlight.astro.build/de/ ) as documentation framework.
28
26
- [ TailwindCSS 4.0-alpha] ( https://tailwindcss.com/blog/tailwindcss-v4-alpha ) for
29
27
component styling which makes use of [ LightningCSS] ( https://lightningcss.dev/ )
30
28
for faster CSS processing.
31
- - [ Cloudflare Pages/Workers ] ( https://pages.cloudflare. com/ ) for deployments.
29
+ - [ Deno Deploy ] ( https://deno. com/deploy ) for deployments.
32
30
33
31
## 🚀 Common workflows
34
32
35
33
See [ ` docs/package.json ` ] ( https://github.com/TraceMachina/nativelink/blob/main/docs/package.json )
36
34
for build scripts.
37
35
38
- This project requires ` pnpm ` . The nix flake ships a compatible version.
36
+ This project requires ` bun ` . The nix flake ships a compatible version.
39
37
40
38
``` bash
41
- # Install dependencies with pnpm. Don't install with bun.
42
- pnpm install
39
+ # Install dependencies with bun.
40
+ bun install
43
41
44
- # Rebuild the API reference.
45
- pnpm metaphase
42
+ # Rebuild the docs reference.
43
+ bun run docs.build
46
44
47
- # Rebuild the simple parts of the autogenerated docs.
48
- pnpm transform
45
+ # Generate the simple parts of the autogenerated docs.
46
+ bun run docs.generate
49
47
50
48
# Rebuild everything. Make sure to remove the `dist` directory beforehand.
51
- pnpm build
49
+ bun run build
50
+
51
+ # Serve the dist directory with deno
52
+ bun serve
52
53
53
54
# Run a development server. Doesn't rebuild the autogenerated parts of the docs.
54
- pnpm dev
55
+ bun dev
55
56
56
57
# Run formatter and linter checks.
57
- pnpm check
58
+ bun check
58
59
59
60
# Apply formatter and linter fixes.
60
- pnpm fix
61
+ bun fix
61
62
62
- # Test cloudflare deployments locally. Useful when debugging SSR. Rebuilds the
63
+ # Test Deno deployments locally. Useful when debugging SSR. Rebuilds the
63
64
# autogenerated parts of the docs.
64
- pnpm preview
65
+ bun preview
65
66
```
66
67
67
- When deploying to Cloudflare, make sure to set the ` PNPM_VERSION ` to ` 8.15.5 ` to
68
- stay in sync with the flake. Also, use `pnpm exec playwright install && pnpm
69
- build` on the Cloudflare worker. This sets up headless Chromium which to
70
- generate mermaid diagrams during the build. You don't need to set playwright up
71
- locally as it's already configured in the flake.
72
68
73
69
## 🐛 Known issues
74
70
75
- - The build process uses Bun as internal TypeScript processor, but can't use it
76
- as bundler yet .
77
- - ` "@playform/compress": "=0.0.12" ` because ` 0.0.13 ` doesn't compress CSS.
71
+ - ` bun run docs. build` doesn't work on MacOS with the nix version of Bazel.
72
+ As a workaround install Bun and Bazel on your host and build the docs outside the flake .
73
+ - ` bun dev ` doesn't reload the changes in the starlight.conf.ts
0 commit comments