From a548b70342b6fb3c80f38c040b10fd09acb694f1 Mon Sep 17 00:00:00 2001 From: hossein-moghadam Date: Wed, 25 Oct 2023 12:49:09 +0330 Subject: [PATCH] docs: rename 3.nuxt.config.md to 3.nuxt-config.md (#23819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Sébastien Chopin --- docs/1.getting-started/10.deployment.md | 2 +- docs/1.getting-started/2.installation.md | 2 +- docs/1.getting-started/3.configuration.md | 6 +++--- docs/1.getting-started/5.seo-meta.md | 2 +- docs/1.getting-started/9.layers.md | 2 +- docs/2.guide/1.concepts/5.modules.md | 2 +- docs/2.guide/2.directory-structure/1.modules.md | 2 +- .../{3.nuxt.config.md => 3.nuxt-config.md} | 2 -- docs/2.guide/3.going-further/10.runtime-config.md | 2 +- docs/2.guide/3.going-further/7.layers.md | 6 +++--- docs/3.api/4.commands/typecheck.md | 2 +- docs/6.bridge/1.overview.md | 2 +- docs/7.migration/2.configuration.md | 2 +- docs/7.migration/20.module-authors.md | 4 ++-- 14 files changed, 18 insertions(+), 20 deletions(-) rename docs/2.guide/2.directory-structure/{3.nuxt.config.md => 3.nuxt-config.md} (99%) diff --git a/docs/1.getting-started/10.deployment.md b/docs/1.getting-started/10.deployment.md index e2bf1c1d02..da7139e316 100644 --- a/docs/1.getting-started/10.deployment.md +++ b/docs/1.getting-started/10.deployment.md @@ -291,7 +291,7 @@ Nuxt 3 can be deployed to several cloud providers with a minimal amount of confi In addition to Node.js servers and static hosting services, a Nuxt 3 project can be deployed with several well-tested presets and minimal amount of configuration. -You can explicitly set the desired preset in the [`nuxt.config`](/docs/guide/directory-structure/nuxt.config) file: +You can explicitly set the desired preset in the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file: ```js [nuxt.config.ts] export default { diff --git a/docs/1.getting-started/2.installation.md b/docs/1.getting-started/2.installation.md index 14e4b53c7c..d64235f01d 100644 --- a/docs/1.getting-started/2.installation.md +++ b/docs/1.getting-started/2.installation.md @@ -32,7 +32,7 @@ Start with one of our starters and themes directly by opening [nuxt.new](https:/ - **Nuxtr**: Install the community-developed [Nuxtr extension](https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode) - **Volar**: Either enable [**Take Over Mode**](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode) (recommended) or add the [TypeScript Vue Plugin](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) - If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)**, you can disable generating the shim for `*.vue` files in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file: + If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)**, you can disable generating the shim for `*.vue` files in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file: ```ts [nuxt.config.ts] export default defineNuxtConfig({ diff --git a/docs/1.getting-started/3.configuration.md b/docs/1.getting-started/3.configuration.md index c3ebf546db..5b5b126d79 100644 --- a/docs/1.getting-started/3.configuration.md +++ b/docs/1.getting-started/3.configuration.md @@ -5,11 +5,11 @@ navigation.icon: i-ph-gear-duotone --- -By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file can override or extend this default configuration. +By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file can override or extend this default configuration. ## Nuxt Configuration -The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file is located at the root of a Nuxt project and can override or extend the application's behavior. +The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file is located at the root of a Nuxt project and can override or extend the application's behavior. A minimal configuration file exports the `defineNuxtConfig` function containing an object with your configuration. The `defineNuxtConfig` helper is globally available without import. @@ -135,7 +135,7 @@ Non primitive JS types | ❌ No | ✅ Yes ## External Configuration Files -Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file as the single source of trust for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt. +Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file as the single source of trust for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt. Name | Config File | How To Configure |----------------------------------------------|---------------------------|------------------------- diff --git a/docs/1.getting-started/5.seo-meta.md b/docs/1.getting-started/5.seo-meta.md index 98f121e8aa..29ec6d2d48 100644 --- a/docs/1.getting-started/5.seo-meta.md +++ b/docs/1.getting-started/5.seo-meta.md @@ -19,7 +19,7 @@ export default defineNuxtConfig({ }) ``` -Providing an [`app.head`](/docs/api/nuxt-config#head) property in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) allows you to customize the head for your entire app. +Providing an [`app.head`](/docs/api/nuxt-config#head) property in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) allows you to customize the head for your entire app. ::callout This method does not allow you to provide reactive data. We recommend to use `useHead()` in `app.vue`. diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 92801a0a18..b897e2185a 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -17,7 +17,7 @@ One of the core features of Nuxt 3 is the layers and extending support. You can ## Usage -You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file. +You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file. ```ts [nuxt.config.ts] export default defineNuxtConfig({ diff --git a/docs/2.guide/1.concepts/5.modules.md b/docs/2.guide/1.concepts/5.modules.md index 82cea38241..e5b64525d3 100644 --- a/docs/2.guide/1.concepts/5.modules.md +++ b/docs/2.guide/1.concepts/5.modules.md @@ -17,7 +17,7 @@ Explore Nuxt Modules ## Add Nuxt Modules -Once you have installed the modules you can add them to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file under the `modules` property. Module developers usually provide additional steps and details for usage. +Once you have installed the modules you can add them to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file under the `modules` property. Module developers usually provide additional steps and details for usage. ```ts [nuxt.config.ts] export default defineNuxtConfig({ diff --git a/docs/2.guide/2.directory-structure/1.modules.md b/docs/2.guide/2.directory-structure/1.modules.md index b57c0ae602..05ec974cf6 100644 --- a/docs/2.guide/2.directory-structure/1.modules.md +++ b/docs/2.guide/2.directory-structure/1.modules.md @@ -11,7 +11,7 @@ The auto-registered files patterns are: - `modules/*/index.ts` - `modules/*.ts` -You don't need to add those local modules to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) separately. +You don't need to add those local modules to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) separately. ::code-group diff --git a/docs/2.guide/2.directory-structure/3.nuxt.config.md b/docs/2.guide/2.directory-structure/3.nuxt-config.md similarity index 99% rename from docs/2.guide/2.directory-structure/3.nuxt.config.md rename to docs/2.guide/2.directory-structure/3.nuxt-config.md index e7a81c8240..8d2259fc70 100644 --- a/docs/2.guide/2.directory-structure/3.nuxt.config.md +++ b/docs/2.guide/2.directory-structure/3.nuxt-config.md @@ -13,7 +13,6 @@ export default defineNuxtConfig({ }) ``` - ::callout `defineNuxtConfig` helper is globally available without import. :: @@ -34,7 +33,6 @@ Discover all the available options in the **Nuxt configuration** documentation. To ensure your configuration is up to date, Nuxt will make a full restart when detecting changes in the main configuration file, the [`.env`](/docs/guide/directory-structure/env), [`.nuxtignore`](/docs/guide/directory-structure/nuxtignore) and `.nuxtrc` dotfiles. - The `.nuxtrc` file is a file that can be used to configure Nuxt with a fla syntax, it is based on [`unjs/rc9`](https://github.com/unjs/rc9). ``` [.nuxtrc] diff --git a/docs/2.guide/3.going-further/10.runtime-config.md b/docs/2.guide/3.going-further/10.runtime-config.md index 4ae443c1ea..9974149a87 100644 --- a/docs/2.guide/3.going-further/10.runtime-config.md +++ b/docs/2.guide/3.going-further/10.runtime-config.md @@ -5,7 +5,7 @@ description: "Nuxt provides a runtime config API to expose configuration and sec ## Exposing -To expose config and environment variables to the rest of your app, you will need to define runtime configuration in your `nuxt.config` file, using the [`runtimeConfig`](/docs/guide/directory-structure/nuxt.config#runtimeconfig) option. +To expose config and environment variables to the rest of your app, you will need to define runtime configuration in your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file, using the [`runtimeConfig`](/docs/api/nuxt-config#runtimeconfig) option. ```ts [nuxt.config.ts] export default defineNuxtConfig({ diff --git a/docs/2.guide/3.going-further/7.layers.md b/docs/2.guide/3.going-further/7.layers.md index 2c7eac1fef..509791742d 100644 --- a/docs/2.guide/3.going-further/7.layers.md +++ b/docs/2.guide/3.going-further/7.layers.md @@ -7,7 +7,7 @@ Nuxt layers are a powerful feature that you can use to share and reuse partial N :read-more{to="/docs/getting-started/layers"} -A minimal Nuxt layer directory should contain a [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file to indicate it is a layer. +A minimal Nuxt layer directory should contain a [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file to indicate it is a layer. ```ts [base/nuxt.config.ts] export default defineNuxtConfig({}) @@ -20,7 +20,7 @@ Additionally, certain other files in the layer directory will be auto-scanned an - [`pages/*`](/docs/guide/directory-structure/pages) - Extend the default pages - [`server/*`](/docs/guide/directory-structure/server) - Extend the default server endpoints & middleware - [`utils/*`](/docs/guide/directory-structure/utils) - Extend the default utils -- [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config)- Extend the default nuxt config +- [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config)- Extend the default nuxt config - [`app.config.ts`](/docs/guide/directory-structure/app-config) - Extend the default app config ## Basic Example @@ -64,7 +64,7 @@ Additionally, certain other files in the layer directory will be auto-scanned an :: ::callout -If you're interested in deepening your understanding about layers, consider examining [a fully fleshed out [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file on the [Docus theme](https://github.com/nuxt-themes/docus/blob/main/nuxt.config.ts). +If you're interested in deepening your understanding about layers, consider examining [a fully fleshed out [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file on the [Docus theme](https://github.com/nuxt-themes/docus/blob/main/nuxt.config.ts). :: ## Starter Template diff --git a/docs/3.api/4.commands/typecheck.md b/docs/3.api/4.commands/typecheck.md index 1666997a5c..a89ed8d22c 100644 --- a/docs/3.api/4.commands/typecheck.md +++ b/docs/3.api/4.commands/typecheck.md @@ -12,7 +12,7 @@ links: npx nuxi typecheck [--log-level] [rootDir] ``` -The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/vue-tsc) to check types throughout your app. +The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) to check types throughout your app. Option | Default | Description -------------------------|-----------------|------------------ diff --git a/docs/6.bridge/1.overview.md b/docs/6.bridge/1.overview.md index 28cbbff0ac..cea237dd31 100644 --- a/docs/6.bridge/1.overview.md +++ b/docs/6.bridge/1.overview.md @@ -64,7 +64,7 @@ npm install -D @nuxt/bridge@npm:@nuxt/bridge-edge Please make sure to avoid any CommonJS syntax such as `module.exports`, `require` or `require.resolve` in your config file. It will soon be deprecated and unsupported. -You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) is also possible and recommended. +You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) is also possible and recommended. ```ts [nuxt.config.ts] import { defineNuxtConfig } from '@nuxt/bridge' diff --git a/docs/7.migration/2.configuration.md b/docs/7.migration/2.configuration.md index 6e2e1eb654..e5ab1d1bd5 100644 --- a/docs/7.migration/2.configuration.md +++ b/docs/7.migration/2.configuration.md @@ -108,7 +108,7 @@ It will be much easier to migrate your application if you use Nuxt's TypeScript You can read more about Nuxt's TypeScript support [in the docs](/docs/guide/concepts/typescript). ::callout -Nuxt can type-check your app using [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/vue-tsc) with `nuxi typecheck` command. +Nuxt can type-check your app using [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) with `nuxi typecheck` command. :: ### Migration diff --git a/docs/7.migration/20.module-authors.md b/docs/7.migration/20.module-authors.md index 6c6df5e796..a45545487e 100644 --- a/docs/7.migration/20.module-authors.md +++ b/docs/7.migration/20.module-authors.md @@ -69,9 +69,9 @@ export default () => { } With Nuxt 3, Nuxt is now a build-time-only dependency, which means that modules shouldn't attempt to hook into the Nuxt runtime. -Your module should work even if it's only added to [`buildModules`](/docs/guide/directory-structure/nuxt.config#buildmodules) (instead of `modules`). For example: +Your module should work even if it's only added to [`buildModules`](/docs/api/nuxt-config#runtimeconfig) (instead of `modules`). For example: -- Avoid updating `process.env` within a Nuxt module and reading by a Nuxt plugin; use [`runtimeConfig`](/docs/guide/directory-structure/nuxt.config#publicruntimeconfig) instead. +- Avoid updating `process.env` within a Nuxt module and reading by a Nuxt plugin; use [`runtimeConfig`](/docs/api/nuxt-config#runtimeconfig) instead. - (*) Avoid depending on runtime hooks like `vue-renderer:*` for production - (*) Avoid adding `serverMiddleware` by importing them inside the module. Instead, add them by referencing a file path so that they are independent of the module's context