diff options
Diffstat (limited to 'docs/nav.ts')
-rw-r--r-- | docs/nav.ts | 159 |
1 files changed, 117 insertions, 42 deletions
diff --git a/docs/nav.ts b/docs/nav.ts index adf99bc6d..a693a04ef 100644 --- a/docs/nav.ts +++ b/docs/nav.ts @@ -33,32 +33,35 @@ export default { description: "Install Bun with npm, Homebrew, Docker, or the official install script.", }), page("quickstart", "Quickstart", { - description: "Get started with Bun by building and running a simple HTTP server in 5 lines of TypeScript.", + description: "Get started with Bun by building and running a simple HTTP server in 6 lines of TypeScript.", + }), + page("templates", "Templates", { + description: "Hit the ground running with one of Bun's official templates, or download a template from GitHub.", }), // page("typescript", "TypeScript"), - divider("CLI"), - page("cli/run", "`bun run`", { - description: - "Use `bun run` to execute JavaScript/TypeScript files, package.json scripts, and executable packages.", - }), - page("cli/install", "`bun install`", { - description: "A 100x faster npm client with workspaces, git dependencies, and private registry support.", - }), - page("cli/test", "`bun test`", { - description: "Bun's test runner uses Jest-compatible syntax but runs 100x faster.", - }), - page("cli/create", "`bun create`", { - description: "Scaffold a new Bun project from an official template or GitHub repo.", - }), - page("cli/bunx", "`bunx`", { - description: - "Use `bunx` to auto-install and run executable packages from npm, or use locally installed command-line tools.", - }), - page("cli/deploy", "`bun deploy`", { - disabled: true, - description: "Deploy your Bun app to the cloud (eventually)", - }), + // divider("CLI"), + // page("cli/run", "`bun run`", { + // description: + // "Use `bun run` to execute JavaScript/TypeScript files, package.json scripts, and executable packages.", + // }), + // page("cli/install", "`bun install`", { + // description: "A 100x faster npm client with workspaces, git dependencies, and private registry support.", + // }), + // page("cli/test", "`bun test`", { + // description: "Bun's test runner uses Jest-compatible syntax but runs 100x faster.", + // }), + // page("cli/create", "`bun create`", { + // description: "Scaffold a new Bun project from an official template or GitHub repo.", + // }), + // page("cli/bunx", "`bunx`", { + // description: + // "Use `bunx` to auto-install and run executable packages from npm, or use locally installed command-line tools.", + // }), + // page("cli/deploy", "`bun deploy`", { + // disabled: true, + // description: "Deploy your Bun app to the cloud (eventually)", + // }), // page("bundler", "Bundler"), // page("cli/bun-install", "`bun install`"), @@ -70,37 +73,113 @@ export default { // page("bundev", "Dev server"), // page("benchmarks", "Benchmarks"), + // divider("Runtime"), divider("Runtime"), - page("runtime/index", "Runtime", { - description: `Bun is a new JavaScript runtime designed to be a faster, leaner, more modern replacement for Node.js.`, + page("cli/run", "`bun run`", { + description: "Use `bun run` to execute JavaScript/TypeScript files and package.json scripts.", + }), + // page("runtime/index", "Overview", { + // description: `Bun is a new JavaScript runtime designed to be a faster, leaner, more modern replacement for Node.js.`, + // }), + // page("runtime/performance", "Performance", { + // description: `Bun is a new JavaScript runtime designed to be a faster, leaner, more modern replacement for Node.js.`, + // }), + page("runtime/loaders", "File types", { + description: `Bun's runtime supports JavaScript/TypeScript files, JSX syntax, Wasm, JSON/TOML imports, and more.`, }), + page("runtime/typescript", "TypeScript", { + description: `Bun can directly execute TypeScript files without additional configuration.`, + }), + // page("runtime/jsx", "JSX", { + // description: `Bun can directly execute TypeScript files without additional configuration.`, + // }), + // page("runtime/apis", "APIs", { + // description: `Bun is a new JavaScript runtime designed to be a faster, leaner, more modern replacement for Node.js.`, + // }), + page("runtime/bun-apis", "Bun APIs", { + description: `Bun provides a set of highly optimized native APIs for performing common tasks.`, + }), + page("runtime/web-apis", "Web APIs", { + description: `Bun implements an array of Web-standard APIs like fetch, URL, and WebSocket.`, + }), + + page("runtime/nodejs-apis", "Node.js compatibility", { + description: `Bun aims for full Node.js compatibility. This page tracks the current compatibility status.`, + }), + + // page("runtime/nodejs", "Node.js compatibility", { + // description: `Track the status of Bun's API compatibility with Node.js.`, + // }), // page("runtime/web-apis", "Web APIs"), + // page("runtime/loaders", "Loaders"), + + page("runtime/hot", "Watch mode", { + description: `Reload your application & tests automatically.`, + }), page("runtime/modules", "Module resolution", { description: `Bun uses ESM and implements an extended version of the Node.js module resolution algorithm.`, }), - page("runtime/hot", "Watch mode", { - description: `Reload your application & tests automatically.`, + page("runtime/autoimport", "Auto-install", { + description: `Never use node_modules again. Bun can optionally auto-install your dependencies on the fly.`, + }), + page("runtime/configuration", "Configuration", { + description: `Bun's runtime is configurable with environment variables and the bunfig.toml config file.`, }), - // page("runtime/loaders", "Loaders"), page("runtime/plugins", "Plugins", { description: `Implement custom loaders and module resolution logic with Bun's plugin system.`, }), + page("runtime/framework", "Framework API", { disabled: true, description: "Coming soon. Use the Framework API to build a fast, cloud-ready framework on top of Bun's bundler and runtime.", }), - // page("runtime/nodejs", "Node.js APIs"), - divider("Ecosystem"), - page("ecosystem/nodejs", "Node.js", { - description: `Track the status of Bun's API compatibility with Node.js.`, + divider("Package manager"), + page("cli/install", "`bun install`", { + description: + "Install all dependencies with `bun install`, or manage dependencies with `bun add` and `bun remove`.", }), - page("ecosystem/typescript", "TypeScript", { - description: `Bun can directly execute TypeScript files without additional configuration.`, + page("install/workspaces", "Workspaces", { + description: "Bun's package manager supports workspaces and mono-repo development workflows.", + }), + page("install/cache", "Global cache", { + description: + "Bun's package manager installs all packages into a shared global cache to avoid redundant re-downloads.", + }), + page("install/lockfile", "Lockfile", { + description: + "Bun's binary lockfile `bun.lockb` tracks your resolved dependency ytrr, making future installs fast and repeatable.", + }), + page("install/registries", "Scopes and registries", { + description: "How to configure private scopes and custom package registries.", + }), + page("install/utilities", "Utilities", { + description: "Use `bun pm` to introspect your global module cache or project dependency tree.", + }), + + divider("Test runner"), + page("cli/test", "`bun test`", { + description: "Bun's test runner uses Jest-compatible syntax but runs 100x faster.", + }), + page("test/writing", "Writing tests", { + description: + "Write your tests using Jest-like expect matchers, plus setup/teardown hooks, snapshot testing, and more", }), - page("ecosystem/react", "React", { - description: `The Bun runtime supports JSX syntax out of the box and optimizes server-side rendering.`, + + divider("Package runner"), + page("cli/bunx", "`bunx`", { + description: "Use `bunx` to auto-install and run executable packages from npm.", + }), + + // page("runtime/nodejs", "Node.js APIs"), + + divider("Ecosystem"), + // page("ecosystem/react", "React", { + // description: `The Bun runtime supports JSX syntax out of the box and optimizes server-side rendering.`, + // }), + page("ecosystem/express", "Express", { + description: `Servers built with Express and other major Node.js HTTP libraries work out of the box.`, }), page("ecosystem/elysia", "Elysia", { description: `Get started with Elysia, a Bun-native framework designed for the edge.`, @@ -111,9 +190,7 @@ export default { page("ecosystem/buchta", "Buchta", { description: `Buchta is a Bun-native fullstack framework for Svelte and Preact apps.`, }), - page("ecosystem/express", "Express", { - description: `Servers built with Express and other major Node.js HTTP libraries work out of the box.`, - }), + page("ecosystem/awesome", "Awesome", { href: "https://github.com/apvarun/awesome-bun", description: ``, @@ -180,9 +257,7 @@ export default { page("project/roadmap", "Roadmap", { description: `Track Bun's near-term and long-term goals.`, }), - page("project/configuration", "Configuration", { - description: `Bun's runtime is configurable with environment variables and the bunfig.toml config file.`, - }), + page("project/benchmarking", "Benchmarking", { description: `Bun is designed for performance. Learn how to benchmark Bun yourself.`, }), |