1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
export type Nav = {
items: NavItem[];
};
export type NavItem = NavPage | NavDivider;
export type NavPage = {
type: "page";
slug: string;
title: string;
disabled?: boolean;
href?: string;
};
type NavDivider = {
type: "divider";
title: string;
};
function page(slug: string, title: string, props?: {disabled?: boolean; href?: string}): NavPage {
return { type: "page", slug, title, ...props };
}
function divider(title: string): NavDivider {
return { type: "divider", title };
}
export default {
items: [
divider("Intro"),
page("index", "What is Bun?"),
page("installation", "Installation"),
page("quickstart", "Quickstart"),
// page("typescript", "TypeScript"),
divider("CLI"),
page("cli/run", "`bun run`"),
page("cli/install", "`bun install`"),
page("cli/test", "`bun test`"),
page("cli/create", "`bun create`"),
page("cli/bunx", "`bunx`"),
page("cli/deploy", "`bun deploy`", {disabled: true}),
// page("bundler", "Bundler"),
// page("cli/bun-install", "`bun install`"),
// page("cli/bun-create", "`bun create`"),
// page("cli/bun-upgrade", "`bun upgrade`"),
// page("cli/bun-bun", "`bun bun`"),
// page("cli/bun-init", "`bun init`"),
// page("cli/bun-completions", "`bun completions`"),
// page("bundev", "Dev server"),
// page("benchmarks", "Benchmarks"),
divider("Runtime"),
page("runtime/index", "Runtime"),
// page("runtime/web-apis", "Web APIs"),
page("runtime/modules", "Module resolution"),
page("runtime/hot", "Hot reloading"),
// page("runtime/loaders", "Loaders"),
page("runtime/plugins", "Plugins"),
page("runtime/framework", "Framework API", {disabled: true}),
// page("runtime/nodejs", "Node.js APIs"),
divider("Ecosystem"),
page("ecosystem/nodejs", "Node.js"),
page("ecosystem/typescript", "TypeScript"),
page("ecosystem/react", "React"),
page("ecosystem/express", "Express"),
page("ecosystem/hono", "Hono"),
page("ecosystem/elysia", "Elysia"),
page("ecosystem/awesome", "Awesome", {
href:"https://github.com/apvarun/awesome-bun"
}),
divider("API"),
page("api/http", "HTTP"), // "`Bun.serve`"),
page("api/websockets", "WebSockets"), // "`Bun.serve`"),
page("api/tcp", "TCP Sockets"), // "`Bun.{listen|connect}`"),
page("api/file-io", "File I/O"), // "`Bun.write`"),
page("api/sqlite", "SQLite"), // "`bun:sqlite`"),
page("api/file-system-router", "FileSystemRouter"), // "`Bun.FileSystemRouter`"),
page("api/globals", "Globals"), // "`Bun.write`"),
page("api/spawn", "Spawn"), // "`Bun.spawn`"),
page("api/transpiler", "Transpiler"), // "`Bun.Transpiler`"),
page("api/console", "Console"), // "`Node-API`"),
page("api/ffi", "FFI"), // "`bun:ffi`"),
page("api/html-rewriter", "HTMLRewriter"), // "`HTMLRewriter`"),
page("api/test", "Testing"), // "`bun:test`"),
page("api/utils", "Utils"), // "`Bun.peek`"),
page("api/dns", "DNS"), // "`bun:dns`"),
page("api/node-api", "Node-API"), // "`Node-API`"),
// divider("Dev Server"),
// page("bun-dev", "Vanilla"),
// page("dev/css", "CSS"),
// page("dev/frameworks", "Frameworks"),
// page("dev/nextjs", "Next.js"),
// page("dev/cra", "Create React App"),
divider("Project"),
page("project/roadmap", "Roadmap"),
page("project/configuration", "Configuration"),
page("project/profiling", "Profiling"),
page("project/developing", "Development"),
page("project/licensing", "License"),
// misc
// page("roadmap", "Roadmap"),
// page("troubleshooting", "Troubleshooting"),
// page("bunfig", "bunfig.toml"),
// page("upgrading-webkit", "Upgrading WebKit"),
// page("bun-flavored-toml", "Bun-flavored TOML"),
],
} satisfies Nav;
|