diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 717f3e8b51b6..1e50821fdc73 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -1,58 +1,58 @@ --- -title: 'Layers' -description: Nuxt provides a powerful system that allows you to extend the default files, configs, and much more. +title: 'Слои' +description: Nuxt предоставляет мощную систему, которая позволяет расширять файлы по умолчанию, конфигурацию и многое другое. navigation.icon: i-ph-stack-duotone --- -One of the core features of Nuxt 3 is the layers and extending support. You can extend a default Nuxt application to reuse components, utils, and configuration. The layers structure is almost identical to a standard Nuxt application which makes them easy to author and maintain. +Одной из основных особенностей Nuxt 3 являются слои и поддержка расширений. Вы можете расширить стандартное приложение Nuxt для повторного использования компонентов, утилит и конфигурации. Структура слоев практически идентична стандартному приложению Nuxt, что делает их простыми в создании и поддержке. -## Use Cases +## Случаи использования -- Share reusable configuration presets across projects using `nuxt.config` and `app.config` -- Create a component library using [`components/`](/docs/guide/directory-structure/components) directory -- Create utility and composable library using [`composables/`](/docs/guide/directory-structure/composables) and [`utils/`](/docs/guide/directory-structure/utils) directories -- Create Nuxt module presets -- Share standard setup across projects -- Create Nuxt themes -- Enhance code organization by implementing a modular architecture and support Domain-Driven Design (DDD) pattern in large scale projects. +- Переиспользование предустановок конфигурации в проектах с помощью `nuxt.config` и `app.config` +- Создание библиотеки компонентов, с использованием директории [`components/`](/docs/guide/directory-structure/components) +- Создание библиотек утилит и композаблов с использованием директорий [`composables/`](/docs/guide/directory-structure/composables) и [`utils/`](/docs/guide/directory-structure/utils) +- Создание предустановок модуля Nuxt +- Распространение стандартных настроек по всем проектам +- Создание тем Nuxt +- Улучшение организации кода за счет внедрения модульной архитектуры и поддержки шаблона Domain-Driven Design (DDD) в больших масштабируемых проектах. ## Использование -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. +Вы можете расширить слой, добавив свойство [extends](/docs/api/nuxt-config#extends) в файл [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config). ```ts [nuxt.config.ts] export default defineNuxtConfig({ extends: [ - '../base', // Extend from a local layer - '@my-themes/awesome', // Extend from an installed npm package - 'github:my-themes/awesome#v1', // Extend from a git repository + '../base', // Расширение из локального слоя + '@my-themes/awesome', // Расширение из установленного пакета npm + 'github:my-themes/awesome#v1', // Расширение из git репозитория ] }) ``` -You can also pass an authentication token if you are extending from a private GitHub repository: +Вы также можете передать токен аутентификации, если вы расширяете из приватного GitHub репозитория: ```ts [nuxt.config.ts] export default defineNuxtConfig({ extends: [ - // per layer configuration + // конфигурация каждого слоя ['github:my-themes/private-awesome', { auth: process.env.GITHUB_TOKEN }] ] }) ``` -Nuxt uses [unjs/c12](https://c12.unjs.io) and [unjs/giget](https://giget.unjs.io) for extending remote layers. Check the documentation for more information and all available options. +Nuxt использует [unjs/c12](https://c12.unjs.io) и [unjs/giget](https://giget.unjs.io) для расширения удаленных слоев. Обратитесь к документации для получения дополнительной информации и всех доступных опций. ::read-more{to="/docs/guide/going-further/layers"} -Read more about layers in the **Layer Author Guide**. +Подробнее о слоях читайте в **Руководстве для автора слоя**. :: ::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=lnFCM7c9f7I" target="_blank"} -Watch a video from Learn Vue about Nuxt Layers. +Посмотрите видео о слоях Nuxt от Learn Vue. :: ::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=fr5yo3aVkfA" target="_blank"} -Watch a video from Alexander Lichter about Nuxt Layers. +Посмотрите видео о слоях Nuxt от Александра Лихтера. :: ## Примеры @@ -66,6 +66,6 @@ Watch a video from Alexander Lichter about Nuxt Layers. target: _blank ui.icon.base: text-black dark:text-white --- - A lightweight Nuxt theme to build a Markdown driven website. Powered by Nuxt Content, TailwindCSS and Iconify. + Легковесная тема Nuxt для создания сайта на основе Markdown. Работает на Nuxt Content, TailwindCSS и Iconify. :: ::