Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: typos and wording tweaks for guide section #24323

Merged
merged 7 commits into from Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/2.guide/1.concepts/2.vuejs-development.md
Expand Up @@ -25,7 +25,7 @@ We chose to build Nuxt on top of Vue for these reasons:

### Auto-imports

Every Vue component created in the [`components/`](/docs/guide/directory-structure/components) directoryof a Nuxt project will be available in your project without having to import it. If a component is not used anywhere, your production’s code will not include it.
Every Vue component created in the [`components/`](/docs/guide/directory-structure/components) directory of a Nuxt project will be available in your project without having to import it. If a component is not used anywhere, your production’s code will not include it.

:read-more{to="/docs/guide/concepts/auto-imports"}

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/1.concepts/7.esm.md
Expand Up @@ -38,7 +38,7 @@ However, there are some key differences with actual spec; here's [a helpful expl

You may have been writing your app using ESM syntax for a long time. After all, it's natively supported by the browser, and in Nuxt 2 we compiled all the code you wrote to the appropriate format (CJS for server, ESM for browser).

When using modules you'd install into your package, things were a little different. A sample library might expose both CJS and ESM versions, and let us pick which one we wanted:
When adding modules to your package, things were a little different. A sample library might expose both CJS and ESM versions, and let us pick which one we wanted:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.components.md
Expand Up @@ -415,7 +415,7 @@ You can specify a `fallbackTag` to make it render a specific tag if it fails to

## Library Authors

Making Vue component libraries with automatic tree-shaking and component registration is super easy ✨
Making Vue component libraries with automatic tree-shaking and component registration is super easy. ✨

You can use the `components:dirs` hook to extend the directory list without requiring user configuration in your Nuxt module.

Expand Down
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/1.middleware.md
Expand Up @@ -9,7 +9,7 @@ Nuxt provides a customizable **route middleware** framework you can use througho

There are three kinds of route middleware:

1. Anonymous (or inline) route middleware are defined directly within the page
1. Anonymous (or inline) route middleware are defined directly within the page.
2. Named route middleware, placed in the `middleware/` and automatically loaded via asynchronous import when used on a page.
3. Global route middleware, placed in the `middleware/` with a `.global` suffix and is run on every route change.

Expand Down Expand Up @@ -157,7 +157,7 @@ export default defineNuxtPlugin(() => {
---| auth.ts
```

In your page file, you can reference this route middleware
In your page file, you can reference this route middleware:

```vue
<script setup lang="ts">
Expand Down
6 changes: 4 additions & 2 deletions docs/2.guide/2.directory-structure/1.pages.md
@@ -1,6 +1,6 @@
---
title: "pages"
description: "Nuxt provides a file-based routing to create routes within your web application."
description: "Nuxt provides file-based routing to create routes within your web application."
head.title: "pages/"
navigation.icon: i-ph-folder-duotone
---
Expand Down Expand Up @@ -336,7 +336,9 @@ Learn more about `<NuxtLink>` usage.

Nuxt 3 allows programmatic navigation through the `navigateTo()` utility method. Using this utility method, you will be able to programmatically navigate the user in your app. This is great for taking input from the user and navigating them dynamically throughout your application. In this example, we have a simple method called `navigate()` that gets called when the user submits a search form.

**Note:** Ensure to always `await` on `navigateTo` or chain its result by returning from functions.
::callout{color="blue" icon="i-ph-info-duotone"}
Ensure to always `await` on `navigateTo` or chain its result by returning from functions.
::

```vue
<script setup lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.public.md
Expand Up @@ -5,7 +5,7 @@ head.title: "public/"
navigation.icon: i-ph-folder-duotone
---

The `public/` is served at the server root and contains public files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).
Files contained within the `public/` directory are served at the root and are not modified by the build process. This is suitable for files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).

```bash [Directory structure]
-| public/
Expand Down
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/1.server.md
Expand Up @@ -5,7 +5,7 @@ description: The server/ directory is used to register API and server handlers t
navigation.icon: i-ph-folder-duotone
---

Nuxt automatically scans files inside these directories to register API and server handlers with HMR support.
Nuxt automatically scans files inside these directories to register API and server handlers with Hot Module Replacement (HMR) support.

```bash [Directory structure]
-| server/
Expand Down Expand Up @@ -142,7 +142,7 @@ To improve clarity within your IDE between the auto-imports from 'nitro' and 'vu
}
```

Although right now these values won't be respected when type checking ([`nuxi typecheck`](/docs/api/commands/typecheck)), you should get better type hints in your IDE.
Currently, these values won't be respected when type checking ([`nuxi typecheck`](/docs/api/commands/typecheck)), but you should get better type hints in your IDE.

## Recipes

Expand Down