Skip to content

Commit

Permalink
Локализация docs/2.guide/1.concepts/5.modules.md (#33) (#193)
Browse files Browse the repository at this point in the history
* feat(docs): translate docs/2.guide/1.concepts/5.modules.md (#33)

Signed-off-by: Evgeniy Gromin <[email protected]>

* [autofix.ci] apply automated fixes

* Fix docs/2.guide/1.concepts/5.modules.md

Co-authored-by: Bochkarev Ivan <[email protected]>

* Update docs/2.guide/1.concepts/5.modules.md

---------

Signed-off-by: Evgeniy Gromin <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Bochkarev Ivan <[email protected]>
  • Loading branch information
3 people authored Jun 19, 2024
1 parent f09713c commit c330a42
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions docs/2.guide/1.concepts/5.modules.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
---
title: 'Modules'
description: "Nuxt provides a module system to extend the framework core and simplify integrations."
title: 'Модули'
description: "Nuxt предоставляет модульную систему для расширения ядра фреймворка и упрощения интеграции."
---

## Exploring Nuxt Modules
## Изучение модулей Nuxt

When developing production-grade applications with Nuxt you might find that the framework's core functionality is not enough. Nuxt can be extended with configuration options and plugins, but maintaining these customizations across multiple projects can be tedious, repetitive and time-consuming. On the other hand, supporting every project's needs out of the box would make Nuxt very complex and hard to use.
При разработке приложений продакшен-уровня с помощью Nuxt вы можете обнаружить, что базовых функций фреймворка недостаточно. Nuxt можно расширить с помощью параметров конфигурации и плагинов, но поддержание этих настроек в нескольких проектах может быть утомительным, повторяющимся и отнимающим много времени. С другой стороны, поддержка потребностей каждого проекта из коробки сделала бы Nuxt очень сложным и трудным в использовании.

This is one of the reasons why Nuxt provides a module system that makes it possible to extend the core. Nuxt modules are async functions that sequentially run when starting Nuxt in development mode using [`nuxi dev`](/docs/api/commands/dev) or building a project for production with [`nuxi build`](/docs/api/commands/build). They can override templates, configure webpack loaders, add CSS libraries, and perform many other useful tasks.
Это одна из причин, по которой Nuxt предоставляет модульную систему, которая позволяет расширять ядро. Модули Nuxt — это асинхронные функции, которые последовательно запускаются при запуске Nuxt в режиме разработки с помощью [`nuxi dev`](/docs/api/commands/dev) или при сборке проекта для продакшена с помощью [`nuxi build`](/docs/api/commands/build). Они могут переопределять шаблоны, настраивать загрузчики webpack, добавлять библиотеки CSS и выполнять множество других полезных задач.

Best of all, Nuxt modules can be distributed in npm packages. This makes it possible for them to be reused across projects and shared with the community, helping create an ecosystem of high-quality add-ons.
Лучше всего то, что модули Nuxt можно распространять в пакетах npm. Это позволяет повторно использовать их в разных проектах и ​​делиться ими с сообществом, помогая создавать экосистему высококачественных дополнений.

::read-more{to="/modules"}
Explore Nuxt Modules
Изучение модулей Nuxt
::

## Add Nuxt Modules
## Добавление модулей Nuxt

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.
После установки модулей вы можете добавить их в файл [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) в свойстве `modules`. Разработчики модулей обычно предоставляют дополнительные шаги и подробности для использования.

```ts twoslash [nuxt.config.ts]
export default defineNuxtConfig({
modules: [
// Using package name (recommended usage)
// Использование имени пакета (рекомендуется)
'@nuxtjs/example',

// Load a local module
// Загрузка локального модуля
'./modules/example',

// Add module with inline-options
// Добавление модуля с inline-опциями
['./modules/example', { token: '123' }],

// Inline module definition
// Определение inline-модуля
async (inlineOptions, nuxt) => { }
]
})
```

::warning
Nuxt modules are now build-time-only, and the `buildModules` property used in Nuxt 2 is deprecated in favor of `modules`.
Модули Nuxt теперь доступны только во время сборки, а свойство `buildModules`, используемое в Nuxt 2, устарело в пользу `modules`.
::

## Create a Nuxt Module
## Создать модуль Nuxt

Everyone has the opportunity to develop modules and we cannot wait to see what you will build.
У каждого есть возможность разрабатывать модули, и мы с нетерпением ждем, что вы создадите.

:read-more{to="/docs/guide/going-further/modules" title="Module Author Guide"}
:read-more{to="/docs/guide/going-further/modules" title="Руководство автора модуля"}

0 comments on commit c330a42

Please sign in to comment.