Skip to content

Commit 41737dd

Browse files
committed
after a long break, translated the introduction and javascript-api :3
1 parent 3762cfa commit 41737dd

File tree

4 files changed

+156
-154
lines changed

4 files changed

+156
-154
lines changed

docs/.vitepress/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default defineConfig({
2828
['meta', { content: 'https://rollupjs.org/twitter-card.jpg', name: 'twitter:image' }]
2929
],
3030
locales: {
31-
en: { label: 'İngiliscə', link: 'https://rollupjs.org' },
31+
en: { label: 'English', link: 'https://rollupjs.org' },
3232
root: { label: 'Azərbaycanca' },
3333
tr: { label: 'Türkçe', link: 'https://tr.rollupjs.org' },
3434
zh: { label: '简体中文', link: 'https://cn.rollupjs.org' }
@@ -69,6 +69,10 @@ export default defineConfig({
6969
}
7070
},
7171
themeConfig: {
72+
docFooter: {
73+
next: 'Növbəti səhifə',
74+
prev: 'Əvvəlki səhifə'
75+
},
7276
editLink: {
7377
pattern: 'https://github.com/rollup/rollup-docs-az/edit/master/docs/:path',
7478
text: 'Bu səhifəni GitHub-da redaktə edin'

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ features:
3131
linkText: Kod bölgüsündən necə istifadə etmək olar
3232
- icon: 🔌
3333
title: Güclü plaginlər
34-
details: Öyrənməyin asan olduğu proqramlaşdırma interfeysi (API) sizə az kodla çox nəticə əldə etməyinizə imkan yaradır. Vite və WMR bu texnologiyadan istifadə edir.
34+
details: Öyrənməyin asan olduğu proqramlaşdırma interfeysi ("API") sizə az kodla çox nəticə əldə etməyinizə imkan yaradır. Vite və WMR bu texnologiyadan istifadə edir.
3535
link: /plugin-development/#plugins-overview
3636
linkText: Plagin yazmağı öyrənin
3737
- icon: 🛠️

docs/introduction/index.md

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,88 @@
11
---
2-
title: Introduction
2+
title: Giriş
33
---
44

55
# {{ $frontmatter.title }}
66

77
[[toc]]
88

9-
## Overview
9+
## Ümumi baxış {#overview}
1010

11-
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the new standardized format for code modules included in the ES6 revision of JavaScript, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. This will eventually be possible natively everywhere, but Rollup lets you do it today.
11+
Rollup kiçik kod parçalarını kitabxana, yaxud tətbiq kimi daha böyük və daha mürəkkəb vahidlərə kompilyasiya edən JavaScript modul bandleridir. O, CommonJS və AMD kimi köhnə üsulların əvəzinə JavaScript-in ES6 nəşrindəki standart modul formatından istifadə edir. ES modulları sizə istədiyiniz kitabxanadan istədiyiniz funksiyaları azad və rahat şəkildə yığmağa şərait yaradır. Gələcəkdə doğma üsullarla bunu hər yerdə etmək mümkün olacaq, ancaq Rollup sizə bu fürsəti indidən verir.
1212

13-
## Installation
13+
## Quraşdırma {#installation}
1414

1515
```shell
1616
npm install --global rollup
1717
```
1818

19-
This will make Rollup available as a global command line tool. You can also install it locally, see [Installing Rollup locally](../tutorial/index.md#installing-rollup-locally).
19+
Bununla Rollup-ı qlobal komanda sətri aləti kimi quraşdırmaq mümkündür. Əgər istəsəniz, Rollup-ı [lokal şəkildə də quraşdıra bilərsiniz](../tutorial/index.md#installing-rollup-locally).
2020

21-
## Quick Start
21+
## Cəld Başlanğıc {#quick-start}
2222

23-
Rollup can be used either through a [command line interface](../command-line-interface/index.md) with an optional configuration file, or else through its [JavaScript API](../javascript-api/index.md). Run `rollup --help` to see the available options and parameters.
23+
Rollup-dan həm ixtiyari bir konfiqurasiya faylı ilə [komanda sətri interfeysi](../command-line-interface/index.md), həm də onun [JavaScript proqramlaşdırma interfeysi](../javascript-api/index.md) vasitəsilə istifadə edə bilərsiniz. Mümkün konfiqurasiya seçimləri və parametrlərini `rollup --help` komandası ilə görə bilərsiniz.
2424

25-
> See [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app) to see example library and application projects using Rollup
25+
> Rollup-ın istifadə olunduğu nümunə kitabxana və tətbiqləri görmək üçün [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) [rollup-starter-app](https://github.com/rollup/rollup-starter-app) proyektlərinə nəzər yetirə bilərsiniz.
2626
27-
These commands assume the entry point to your application is named `main.js`, and that you'd like all imports compiled into a single file named `bundle.js`.
27+
Bu komandalar ilə əsas giriş nöqtəsi `main.js` olan və bütün idxalatı `bundle.js` faylında cəmləşən bir tətbiqi kompilyasiya edə bilərsiniz.
2828

29-
For browsers:
29+
::: code-group
3030

31-
```shell
32-
# compile to a <script> containing a self-executing function ('iife')
33-
rollup main.js --file bundle.js --format iife
31+
```shell [Brauzerlər üçün:]
32+
# öz-özünü işə salan funksiyanın (iife) mövcud olduğu <script> teqinə kompilyasiya edir
33+
$ rollup main.js --file bundle.js --format iife
3434
```
3535

36-
For Node.js:
37-
38-
```shell
39-
# compile to a CommonJS module ('cjs')
40-
rollup main.js --file bundle.js --format cjs
36+
```shell [Node.js üçün:]
37+
# CommonJS moduluna (cjs) kompilyasiya edir
38+
$ rollup main.js --file bundle.js --format cjs
4139
```
4240

43-
For both browsers and Node.js:
44-
45-
```shell
46-
# UMD format requires a bundle name
47-
rollup main.js --file bundle.js --format umd --name "myBundle"
41+
```shell [Həm brauzerlər, həm də Node.js üçün:]
42+
# UMD formatında bandl adını qeyd etmək lazım gəlir
43+
$ rollup main.js --file bundle.js --format umd --name "myBundle"
4844
```
4945

50-
## The Why
46+
:::
47+
48+
## Niyə Məhz Rollup {#the-why}
5149

52-
Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language.
50+
Proyekti kiçik hissələrə böləndə proqram yazmaq, adətən, daha asan başa gəlir, çünki belə olan halda gözlənilməyən qarşılıqlı təsirlər və həll olunmalı problemlərin mürəkkəbliyi böyük ölçüdə azalır. Bununla belə, sadəcə kiçik ölçülü proyektlər yazmaq da [hər zaman çıxış yolu olmur](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Təəssüf ki, JavaScript dilinin özülündə tarixən bu qabiliyyət mövcud olmayıb.
5351

54-
This finally changed with the ES6 revision of JavaScript, which includes a syntax for importing and exporting functions and data so they can be shared between separate scripts. The specification is now fixed, but it is only implemented in modern browsers and not finalised in Node.js. Rollup allows you to write your code using the new module system, and will then compile it back down to existing supported formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to _write future-proof code_, and you also get the tremendous benefits of…
52+
Bu, nəhayət, JavaScript-in ES6 nəşrində dəyişdi — data və funksiyaların ayrı-ayrı skriptlərdə istifadə edilə bilməsi məqsədilə idxal və ixracı üçün məqsədəuyğun sintaksis əlavə edildi. Bu spesifikasiya artıq qərarlaşdırılmış olsa da, yalnız müasir brauzerlər tərəfindən dəstəklənir və Node.js-də tamamlanmamışdır. Rollup sizə yeni modul sistemindən istifadə edərək kod yazmağınız üçün şərait yaradır. Yazdığınız kod isə CommonJS AMD modulları, həmçinin öz-özünü işə salan skriptlərə kompilyasiya olunur. Beləliklə, siz _gələcəyə davamlı_ kod yaza bilərsiniz.
5553

56-
## Tree-Shaking
54+
## Tri-Şeykinq {#tree-shaking}
5755

58-
In addition to enabling the use of ES modules, Rollup also statically analyzes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.
56+
ES modullarının istifadəsini mümkün etməkdən başqa, Rollup həmçinin sizin idxal etdiyiniz kodu statik analizini edir və istifadə edilməyən hissələri kənarlaşdırır. Bu isə sizə əlavə asılılıqlar əlavə etmədən, yaxud proyektin ölçüsündə güzəştə getmədən mövcud alətlər və modullarla kod yazmağınıza imkan yaradır.
5957

60-
For example, with CommonJS, the _entire tool or library must be imported_.
58+
Məsələn, CommonJS-də siz gərək bütün aləti, yaxud kitabxananı idxal edəsiniz.
6159

6260
```js
63-
// import the entire utils object with CommonJS
61+
// CommonJS ilə bütün utils obyektini idxal edirsiniz
6462
const utils = require('./utils');
6563
const query = 'Rollup';
66-
// use the ajax method of the utils object
64+
// utilitler obyektinin ajax metodundan istifadə edirsiniz
6765
utils.ajax(`https://api.example.com?search=${query}`).then(handleResponse);
6866
```
6967

70-
With ES modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need:
68+
ES modulları ilə isə bütün `utils` obyekti əvəzinə sadəcə bizə lazım olan `ajax` funksiyasını idxal edə bilərik:
7169

7270
```js
73-
// import the ajax function with an ES6 import statement
71+
// ES6 idxal bəyanatı ilə ajax funksiyasını idxal edin
7472
import { ajax } from './utils';
7573
const query = 'Rollup';
76-
// call the ajax function
74+
// ajax funksiyasını işə salın
7775
ajax(`https://api.example.com?search=${query}`).then(handleResponse);
7876
```
7977

80-
Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach can utilise explicit `import` and `export` statements, it is more effective than simply running an automated minifier to detect unused variables in the compiled output code.
78+
Rollup mümkün qədər minimal kod ehtiva etdiyi üçün daha yüngül, daha sürətli və daha az mürəkkəb kitabxanalar və tətbiqlər yaradır. Beləliklə, birbaşa `import` `export` bəyanatlarından istifadə edildiyi üçün kompilyasiya edilmiş kodda istifadə edilməyən dəyişkənləri avtomatik kiçildici ilə aşkar etməkdən daha əlverişli bir üsul alınır.
8179

82-
## Compatibility
80+
## Uyğunluq {#compatibility}
8381

84-
### Importing CommonJS
82+
### CommonJS İdxalatı {#importing-commonjs}
8583

86-
Rollup can import existing CommonJS modules [through a plugin](https://github.com/rollup/plugins/tree/master/packages/commonjs).
84+
Rollup [plagin vasitəsilə](https://github.com/rollup/plugins/tree/master/packages/commonjs) mövcud CommonJS modullarını idxal edə bilər.
8785

88-
### Publishing ES Modules
86+
### ES Modullarının Yayımlanması {#publishing-es-modules}
8987

90-
To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES-module-aware tools like Rollup and [webpack 2+](https://webpack.js.org/) will [import the ES module version](https://github.com/rollup/rollup/wiki/pkg.module) directly.
88+
ES modullarınızın Node.js, yaxud webpack kimi CommonJS ilə işləyən alətlər tərəfindən istifadə edilə bilməsini təmin etmək üçün Rollup ilə UMD, yaxud CommonJS formatlarına kompilyasiya edib `package.json` faylındakı `main` parametrinə həmin kompilyasiya edilmiş faylı təyin edə bilərsiniz. Əgər `package.json` faylınızda `module` da təyin edilibsə, [webpack 2+](https://webpack.js.org/) və Rollup kimi ES modulunu tanıyan alətlər [birbaşa ES modulunu idxal edəcək](https://github.com/rollup/rollup/wiki/pkg.module).

0 commit comments

Comments
 (0)