From c99caccdb2e1bb961b13766ec7ebb9907763e364 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 13 Sep 2023 20:43:39 -0700 Subject: More docs & helptext cleanup (#5229) * wip * Flesh out resolution docs * Polish * More * WIP * WIP * WIP * Document --watch --- docs/guides/ecosystem/nextjs.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs/guides/ecosystem/nextjs.md') diff --git a/docs/guides/ecosystem/nextjs.md b/docs/guides/ecosystem/nextjs.md index a455eb23e..4d3be8cfc 100644 --- a/docs/guides/ecosystem/nextjs.md +++ b/docs/guides/ecosystem/nextjs.md @@ -3,7 +3,7 @@ name: Build an app with Next.js and Bun --- {% callout %} -Next.js currently relies on Node.js APIs that Bun does not yet implement. The guide below uses Bun to initialize a project and install dependencies, but it uses Node.js to run the dev server. +The Next.js [App Router](https://nextjs.org/docs/app) currently relies on Node.js APIs that Bun does not yet implement. The guide below uses Bun to initialize a project and install dependencies, but it uses Node.js to run the dev server. {% /callout %} --- @@ -23,7 +23,16 @@ Creating a new Next.js app in /path/to/my-app. --- -To start the dev server, run `bun run dev` from the project root. +To start the dev server with Bun, run `bun --bun run dev` from the project root. + +```sh +$ cd my-app +$ bun --bun run dev +``` + +--- + +To run the dev server with Node.js instead, omit `--bun`. ```sh $ cd my-app -- cgit v1.2.3 From 6ac70a6dd2449da987462f2cdcdf80c770abadaf Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 13 Sep 2023 20:47:36 -0700 Subject: Use bun create everywhere --- docs/guides/ecosystem/astro.md | 4 ++-- docs/guides/ecosystem/hono.md | 2 +- docs/guides/ecosystem/nextjs.md | 2 +- docs/guides/ecosystem/remix.md | 2 +- docs/guides/ecosystem/solidstart.md | 2 +- docs/guides/ecosystem/vite.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/guides/ecosystem/nextjs.md') diff --git a/docs/guides/ecosystem/astro.md b/docs/guides/ecosystem/astro.md index 6a8a9fa5f..dac2bc369 100644 --- a/docs/guides/ecosystem/astro.md +++ b/docs/guides/ecosystem/astro.md @@ -2,10 +2,10 @@ name: Build an app with Astro and Bun --- -Initialize a fresh Astro app with `bunx create-astro`. The `create-astro` package detects when you are using `bunx` and will automatically install dependencies using `bun`. +Initialize a fresh Astro app with `bun create astro`. The `create-astro` package detects when you are using `bunx` and will automatically install dependencies using `bun`. ```sh -$ bunx create-astro +$ bun create astro ╭─────╮ Houston: │ ◠ ◡ ◠ We're glad to have you on board. ╰─────╯ diff --git a/docs/guides/ecosystem/hono.md b/docs/guides/ecosystem/hono.md index 6d928a655..df662973d 100644 --- a/docs/guides/ecosystem/hono.md +++ b/docs/guides/ecosystem/hono.md @@ -18,7 +18,7 @@ export default app; Use `create-hono` to get started with one of Hono's project templates. Select `bun` when prompted for a template. ```bash -$ bunx create-hono myapp +$ bun create hono myapp ✔ Which template do you want to use? › bun cloned honojs/starter#main to /path/to/myapp ✔ Copied project files diff --git a/docs/guides/ecosystem/nextjs.md b/docs/guides/ecosystem/nextjs.md index 4d3be8cfc..a3ad8550c 100644 --- a/docs/guides/ecosystem/nextjs.md +++ b/docs/guides/ecosystem/nextjs.md @@ -11,7 +11,7 @@ The Next.js [App Router](https://nextjs.org/docs/app) currently relies on Node.j Initialize a Next.js app with `create-next-app`. This automatically installs dependencies using `npm`. ```sh -$ bunx create-next-app +$ bun create next-app ✔ What is your project named? … my-app ✔ Would you like to use TypeScript with this project? … No / Yes ✔ Would you like to use ESLint with this project? … No / Yes diff --git a/docs/guides/ecosystem/remix.md b/docs/guides/ecosystem/remix.md index ee6185294..56198d603 100644 --- a/docs/guides/ecosystem/remix.md +++ b/docs/guides/ecosystem/remix.md @@ -11,7 +11,7 @@ Remix currently relies on Node.js APIs that Bun does not yet implement. The guid Initialize a Remix app with `create-remix`. ```sh -$ bunx create-remix +$ bun create remix remix v1.19.3 💿 Let's build a better website... diff --git a/docs/guides/ecosystem/solidstart.md b/docs/guides/ecosystem/solidstart.md index ca2ef471e..fb8d54d91 100644 --- a/docs/guides/ecosystem/solidstart.md +++ b/docs/guides/ecosystem/solidstart.md @@ -11,7 +11,7 @@ SolidStart currently relies on Node.js APIs that Bun does not yet implement. The Initialize a SolidStart app with `create-solid`. ```sh -$ bunx create-solid my-app +$ bun create solid my-app create-solid version 0.2.31 Welcome to the SolidStart setup wizard! diff --git a/docs/guides/ecosystem/vite.md b/docs/guides/ecosystem/vite.md index 3cad145f9..03ff85472 100644 --- a/docs/guides/ecosystem/vite.md +++ b/docs/guides/ecosystem/vite.md @@ -11,7 +11,7 @@ While Vite currently works with Bun, it has not been heavily optimized, nor has Vite works out of the box with Bun. Get started with one of Vite's templates. ```bash -$ bunx create-vite my-app +$ bun create vite my-app ✔ Select a framework: › React ✔ Select a variant: › TypeScript + SWC Scaffolding project in /path/to/my-app... -- cgit v1.2.3 From 49a44eef0f3b6ef51ad46392be47e1cfbaf7435b Mon Sep 17 00:00:00 2001 From: kryparnold <45902187+kryparnold@users.noreply.github.com> Date: Thu, 14 Sep 2023 07:59:16 +0300 Subject: Update nextjs.md (#4905) --- docs/guides/ecosystem/nextjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/guides/ecosystem/nextjs.md') diff --git a/docs/guides/ecosystem/nextjs.md b/docs/guides/ecosystem/nextjs.md index a3ad8550c..d8bf337c2 100644 --- a/docs/guides/ecosystem/nextjs.md +++ b/docs/guides/ecosystem/nextjs.md @@ -41,4 +41,4 @@ $ bun run dev --- -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. Any changes you make to `pages/index.tsx` will be hot-reloaded in the browser. +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. Any changes you make to `(pages/app)/index.tsx` will be hot-reloaded in the browser. -- cgit v1.2.3