diff options
author | 2023-02-23 17:13:30 -0800 | |
---|---|---|
committer | 2023-02-23 17:13:30 -0800 | |
commit | f54300578b1edc7f67daddbfae29575cbf305264 (patch) | |
tree | 1437f3274122c011f879dca71f59a74d75a33fd0 /docs/nav.ts | |
parent | 5929daeeae1f528abab31979a0a28bc87a03b1f4 (diff) | |
download | bun-f54300578b1edc7f67daddbfae29575cbf305264.tar.gz bun-f54300578b1edc7f67daddbfae29575cbf305264.tar.zst bun-f54300578b1edc7f67daddbfae29575cbf305264.zip |
Add documentation (#2148)bun-v0.5.7
* Add documentation
* Tweaks
* Fixes
* Rearrange
* Update
Diffstat (limited to 'docs/nav.ts')
-rw-r--r-- | docs/nav.ts | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/docs/nav.ts b/docs/nav.ts new file mode 100644 index 000000000..79953347e --- /dev/null +++ b/docs/nav.ts @@ -0,0 +1,95 @@ +export type Nav = { + items: NavItem[]; +}; + +export type NavItem = NavPage | NavDivider; +export type NavPage = { + type: "page"; + slug: string; + title: string; +}; +type NavDivider = { + type: "divider"; + title: string; +}; + +function page(slug: string, title: string): NavPage { + return { type: "page", slug, title }; +} +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("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/nodejs", "Node.js APIs"), + + 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; |