docs: update some code groups with package manager examples (#27791)

This commit is contained in:
Dominic 2024-06-26 06:30:37 +10:00 committed by Daniel Roe
parent cbd66cdafc
commit 088a86f442
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
4 changed files with 56 additions and 4 deletions

View File

@ -11,10 +11,26 @@ navigation.icon: i-ph-arrow-circle-up-duotone
To upgrade Nuxt to the [latest release](https://github.com/nuxt/nuxt/releases), use the `nuxi upgrade` command. To upgrade Nuxt to the [latest release](https://github.com/nuxt/nuxt/releases), use the `nuxi upgrade` command.
```bash [Terminal] ::code-group
```bash [npm]
npx nuxi upgrade npx nuxi upgrade
``` ```
```bash [yarn]
yarn dlx nuxi upgrade
```
```bash [pnpm]
pnpm dlx nuxi upgrade
```
```bash [bun]
bunx nuxi upgrade
```
::
### Nightly Release Channel ### Nightly Release Channel
To use the latest Nuxt build and test features before their release, read about the [nightly release channel](/docs/guide/going-further/nightly-release-channel) guide. To use the latest Nuxt build and test features before their release, read about the [nightly release channel](/docs/guide/going-further/nightly-release-channel) guide.

View File

@ -37,10 +37,14 @@ Open a terminal (if you're using [Visual Studio Code](https://code.visualstudio.
::code-group ::code-group
```bash [npx] ```bash [npm]
npx nuxi@latest init <project-name> npx nuxi@latest init <project-name>
``` ```
```bash [yarn]
yarn dlx nuxi@latest init <project-name>
```
```bash [pnpm] ```bash [pnpm]
pnpm dlx nuxi@latest init <project-name> pnpm dlx nuxi@latest init <project-name>
``` ```

View File

@ -77,10 +77,26 @@ h1 {
You can also reference stylesheets that are distributed through npm. Let's use the popular `animate.css` library as an example. You can also reference stylesheets that are distributed through npm. Let's use the popular `animate.css` library as an example.
```bash [Terminal] ::code-group
```bash [npm]
npm install animate.css npm install animate.css
``` ```
```bash [yarn]
yarn add animate.css
```
```bash [pnpm]
pnpm install animate.css
```
```bash [bun]
bun install animate.css
```
::
Then you can reference it directly in your pages, layouts and components: Then you can reference it directly in your pages, layouts and components:
```vue [app.vue] ```vue [app.vue]

View File

@ -14,10 +14,26 @@ Use the [`nuxi generate` command](/docs/api/commands/generate) to build and pre-
This will build your site, stand up a nuxt instance, and, by default, prerender the root page `/` along with any of your site's pages it links to, any of your site's pages they link to, and so on. This will build your site, stand up a nuxt instance, and, by default, prerender the root page `/` along with any of your site's pages it links to, any of your site's pages they link to, and so on.
```bash [Terminal] ::code-group
```bash [npm]
npx nuxi generate npx nuxi generate
``` ```
```bash [yarn]
yarn dlx nuxi generate
```
```bash [pnpm]
pnpm dlx nuxi generate
```
```bash [bun]
bunx nuxi generate
```
::
You can now deploy the `.output/public` directory to any static hosting service or preview it locally with `npx serve .output/public`. You can now deploy the `.output/public` directory to any static hosting service or preview it locally with `npx serve .output/public`.
Working of the Nitro crawler: Working of the Nitro crawler: