diff options
Diffstat (limited to 'doc/docs/id-id/doc/getting-started')
| -rw-r--r-- | doc/docs/id-id/doc/getting-started/installation.md | 24 | ||||
| -rw-r--r-- | doc/docs/id-id/doc/getting-started/introduction.md | 16 | ||||
| -rw-r--r-- | doc/docs/id-id/doc/getting-started/usage.md | 117 |
3 files changed, 79 insertions, 78 deletions
diff --git a/doc/docs/id-id/doc/getting-started/installation.md b/doc/docs/id-id/doc/getting-started/installation.md index a93ddfd..2809cca 100644 --- a/doc/docs/id-id/doc/getting-started/installation.md +++ b/doc/docs/id-id/doc/getting-started/installation.md | |||
| @@ -1,43 +1,43 @@ | |||
| 1 | # Installation | 1 | # Instalasi |
| 2 | 2 | ||
| 3 | ## Lua Module | 3 | ## Modul Lua |
| 4 | 4 | ||
| 5 | Install [luarocks](https://luarocks.org), a package manager for Lua modules. Then install it as a Lua module and executable with: | 5 | Instal [luarocks](https://luarocks.org), manajer paket untuk modul Lua. Lalu instal sebagai modul Lua dan executable dengan: |
| 6 | 6 | ||
| 7 | ```shell | 7 | ```shell |
| 8 | luarocks install yuescript | 8 | luarocks install yuescript |
| 9 | ``` | 9 | ``` |
| 10 | 10 | ||
| 11 | Or you can build `yue.so` file with: | 11 | Atau Anda dapat membangun file `yue.so` dengan: |
| 12 | 12 | ||
| 13 | ```shell | 13 | ```shell |
| 14 | make shared LUAI=/usr/local/include/lua LUAL=/usr/local/lib/lua | 14 | make shared LUAI=/usr/local/include/lua LUAL=/usr/local/lib/lua |
| 15 | ``` | 15 | ``` |
| 16 | 16 | ||
| 17 | Then get the binary file from path **bin/shared/yue.so**. | 17 | Lalu ambil file biner dari path **bin/shared/yue.so**. |
| 18 | 18 | ||
| 19 | ## Build Binary Tool | 19 | ## Membangun Tool Biner |
| 20 | 20 | ||
| 21 | Clone this repo, then build and install executable with: | 21 | Klon repo ini, lalu bangun dan instal executable dengan: |
| 22 | 22 | ||
| 23 | ```shell | 23 | ```shell |
| 24 | make install | 24 | make install |
| 25 | ``` | 25 | ``` |
| 26 | 26 | ||
| 27 | Build YueScript tool without macro feature: | 27 | Bangun tool YueScript tanpa fitur macro: |
| 28 | 28 | ||
| 29 | ```shell | 29 | ```shell |
| 30 | make install NO_MACRO=true | 30 | make install NO_MACRO=true |
| 31 | ``` | 31 | ``` |
| 32 | 32 | ||
| 33 | Build YueScript tool without built-in Lua binary: | 33 | Bangun tool YueScript tanpa biner Lua bawaan: |
| 34 | 34 | ||
| 35 | ```shell | 35 | ```shell |
| 36 | make install NO_LUA=true | 36 | make install NO_LUA=true |
| 37 | ``` | 37 | ``` |
| 38 | 38 | ||
| 39 | ## Download Precompiled Binary | 39 | ## Unduh Biner Pra-kompilasi |
| 40 | 40 | ||
| 41 | You can download precompiled binary files, including binary executable files compatible with different Lua versions and library files. | 41 | Anda dapat mengunduh file biner pra-kompilasi, termasuk file executable biner yang kompatibel dengan berbagai versi Lua dan file library. |
| 42 | 42 | ||
| 43 | Download precompiled binary files from [here](https://github.com/IppClub/YueScript/releases). | 43 | Unduh file biner pra-kompilasi dari [sini](https://github.com/IppClub/YueScript/releases). |
diff --git a/doc/docs/id-id/doc/getting-started/introduction.md b/doc/docs/id-id/doc/getting-started/introduction.md index a9a9389..c2fc236 100644 --- a/doc/docs/id-id/doc/getting-started/introduction.md +++ b/doc/docs/id-id/doc/getting-started/introduction.md | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | # Introduction | 1 | # Pendahuluan |
| 2 | 2 | ||
| 3 | YueScript is a dynamic language that compiles to Lua. And it's a [MoonScript](https://github.com/leafo/moonscript) dialect. The codes written in YueScript are expressive and extremely concise. And it is suitable for writing some changing application logic with more maintainable codes and runs in a Lua embeded environment such as games or website servers. | 3 | YueScript adalah bahasa dinamis yang dikompilasi ke Lua, dan merupakan dialek [MoonScript](https://github.com/leafo/moonscript). Kode yang ditulis dengan YueScript ekspresif dan sangat ringkas. YueScript cocok untuk menulis logika aplikasi yang sering berubah dengan kode yang lebih mudah dipelihara, serta berjalan di lingkungan embed Lua seperti game atau server situs web. |
| 4 | 4 | ||
| 5 | Yue (ζ) is the name of moon in Chinese and it's pronounced as [jyΙ]. | 5 | Yue (ζ) adalah kata untuk bulan dalam bahasa Tionghoa dan diucapkan sebagai [jyΙ]. |
| 6 | 6 | ||
| 7 | ## An Overview of YueScript | 7 | ## Ikhtisar YueScript |
| 8 | 8 | ||
| 9 | ```yuescript | 9 | ```yuescript |
| 10 | -- import syntax | 10 | -- import syntax |
| @@ -48,7 +48,7 @@ with apple | |||
| 48 | p .size, .color, .<index> if .<>? | 48 | p .size, .color, .<index> if .<>? |
| 49 | 49 | ||
| 50 | -- js-like export syntax | 50 | -- js-like export syntax |
| 51 | export π = "ζδΉθζ¬" | 51 | export π = "Skrip Bulan" |
| 52 | ``` | 52 | ``` |
| 53 | 53 | ||
| 54 | <YueDisplay> | 54 | <YueDisplay> |
| @@ -95,11 +95,11 @@ with apple | |||
| 95 | p .size, .color, .<index> if .<>? | 95 | p .size, .color, .<index> if .<>? |
| 96 | 96 | ||
| 97 | -- js-like export syntax | 97 | -- js-like export syntax |
| 98 | export π = "ζδΉθζ¬" | 98 | export π = "Skrip Bulan" |
| 99 | ``` | 99 | ``` |
| 100 | 100 | ||
| 101 | </YueDisplay> | 101 | </YueDisplay> |
| 102 | 102 | ||
| 103 | ## About Dora SSR | 103 | ## Tentang Dora SSR |
| 104 | 104 | ||
| 105 | YueScript is being developed and maintained alongside the open-source game engine [Dora SSR](https://github.com/Dora-SSR/Dora-SSR). It has been used to create engine tools, game demos and prototypes, validating its capabilities in real-world scenarios while enhancing the Dora SSR development experience. \ No newline at end of file | 105 | YueScript dikembangkan dan dipelihara bersama mesin game open-source [Dora SSR](https://github.com/Dora-SSR/Dora-SSR). YueScript telah digunakan untuk membuat alat mesin, demo game, dan prototipe, membuktikan kemampuannya dalam skenario dunia nyata sekaligus meningkatkan pengalaman pengembangan Dora SSR. |
diff --git a/doc/docs/id-id/doc/getting-started/usage.md b/doc/docs/id-id/doc/getting-started/usage.md index 45161c6..85cad07 100644 --- a/doc/docs/id-id/doc/getting-started/usage.md +++ b/doc/docs/id-id/doc/getting-started/usage.md | |||
| @@ -1,20 +1,20 @@ | |||
| 1 | # Usage | 1 | # Penggunaan |
| 2 | 2 | ||
| 3 | ## Lua Module | 3 | ## Modul Lua |
| 4 | 4 | ||
| 5 | Use YueScript module in Lua: | 5 | Gunakan modul YueScript di Lua: |
| 6 | 6 | ||
| 7 | * **Case 1** | 7 | * **Kasus 1** |
| 8 | 8 | ||
| 9 | Require "your_yuescript_entry.yue" in Lua. | 9 | Require "your_yuescript_entry.yue" di Lua. |
| 10 | ```Lua | 10 | ```Lua |
| 11 | require("yue")("your_yuescript_entry") | 11 | require("yue")("your_yuescript_entry") |
| 12 | ``` | 12 | ``` |
| 13 | And this code still works when you compile "your_yuescript_entry.yue" to "your_yuescript_entry.lua" in the same path. In the rest YueScript files just use the normal **require** or **import**. The code line numbers in error messages will also be handled correctly. | 13 | Dan kode ini tetap bekerja ketika Anda mengompilasi "your_yuescript_entry.yue" menjadi "your_yuescript_entry.lua" di path yang sama. Pada file YueScript lainnya cukup gunakan **require** atau **import** biasa. Nomor baris pada pesan error juga akan ditangani dengan benar. |
| 14 | 14 | ||
| 15 | * **Case 2** | 15 | * **Kasus 2** |
| 16 | 16 | ||
| 17 | Require YueScript module and rewite message by hand. | 17 | Require modul YueScript dan tulis ulang pesan secara manual. |
| 18 | 18 | ||
| 19 | ```lua | 19 | ```lua |
| 20 | local yue = require("yue") | 20 | local yue = require("yue") |
| @@ -26,9 +26,9 @@ Use YueScript module in Lua: | |||
| 26 | end) | 26 | end) |
| 27 | ``` | 27 | ``` |
| 28 | 28 | ||
| 29 | * **Case 3** | 29 | * **Kasus 3** |
| 30 | 30 | ||
| 31 | Use the YueScript compiler function in Lua. | 31 | Gunakan fungsi kompiler YueScript di Lua. |
| 32 | 32 | ||
| 33 | ```lua | 33 | ```lua |
| 34 | local yue = require("yue") | 34 | local yue = require("yue") |
| @@ -48,64 +48,65 @@ Use YueScript module in Lua: | |||
| 48 | }) | 48 | }) |
| 49 | ``` | 49 | ``` |
| 50 | 50 | ||
| 51 | ## YueScript Tool | 51 | ## Tool YueScript |
| 52 | 52 | ||
| 53 | Use YueScript tool with: | 53 | Gunakan tool YueScript dengan: |
| 54 | 54 | ||
| 55 | ```shell | 55 | ```shell |
| 56 | > yue -h | 56 | > yue -h |
| 57 | Usage: yue | 57 | Penggunaan: yue |
| 58 | [options] [<file/directory>] ... | 58 | [opsi] [<file/direktori>] ... |
| 59 | yue -e <code_or_file> [args...] | 59 | yue -e <kode_atau_file> [argumen...] |
| 60 | yue -w [<directory>] [options] | 60 | yue -w [<direktori>] [opsi] |
| 61 | yue - | 61 | yue - |
| 62 | 62 | ||
| 63 | Notes: | 63 | Catatan: |
| 64 | - '-' / '--' must be the first and only argument. | 64 | - '-' / '--' harus menjadi argumen pertama dan satu-satunya. |
| 65 | - '-o/--output' can not be used with multiple input files. | 65 | - '-o/--output' tidak dapat digunakan dengan beberapa file input. |
| 66 | - '-w/--watch' can not be used with file input (directory only). | 66 | - '-w/--watch' tidak dapat digunakan dengan file input (khusus direktori). |
| 67 | - with '-e/--execute', remaining tokens are treated as script args. | 67 | - dengan '-e/--execute', token sisanya dianggap sebagai argumen skrip. |
| 68 | 68 | ||
| 69 | Options: | 69 | Opsi: |
| 70 | -h, --help Show this help message and exit. | 70 | -h, --help Tampilkan pesan bantuan ini dan keluar. |
| 71 | -e <str>, --execute <str> Execute a file or raw codes | 71 | -e <str>, --execute <str> Eksekusi file atau kode mentah |
| 72 | -m, --minify Generate minified codes | 72 | -m, --minify Menghasilkan kode yang sudah diminimasi |
| 73 | -r, --rewrite Rewrite output to match original line numbers | 73 | -r, --rewrite Tulis ulang output agar sesuai dengan nomor baris asal |
| 74 | -t <output_to>, --output-to <output_to> | 74 | -t <output_to>, --output-to <output_to> |
| 75 | Specify where to place compiled files | 75 | Tentukan lokasi untuk menaruh file hasil kompilasi |
| 76 | -o <file>, --output <file> Write output to file | 76 | -o <file>, --output <file> Tulis output ke file |
| 77 | -p, --print Write output to standard out | 77 | -p, --print Tulis output ke standar output |
| 78 | -b, --benchmark Dump compile time (doesn't write output) | 78 | -b, --benchmark Tampilkan waktu kompilasi (tanpa menulis output) |
| 79 | -g, --globals Dump global variables used in NAME LINE COLUMN | 79 | -g, --globals Tampilkan variabel global yang digunakan dalam FORMAT NAMA BARIS KOLOM |
| 80 | -s, --spaces Use spaces in generated codes instead of tabs | 80 | -s, --spaces Pakai spasi di kode hasil kompilasi (bukan tab) |
| 81 | -l, --line-numbers Write line numbers from source codes | 81 | -l, --line-numbers Tulis nomor baris dari kode sumber |
| 82 | -j, --no-implicit-return Disable implicit return at end of file | 82 | -j, --no-implicit-return Nonaktifkan return implisit di akhir file |
| 83 | -c, --reserve-comments Reserve comments before statement from source codes | 83 | -c, --reserve-comments Pertahankan komentar sebelum pernyataan dari kode sumber |
| 84 | -w [<dir>], --watch [<dir>] | 84 | -w [<dir>], --watch [<dir>] |
| 85 | Watch changes and compile every file under directory | 85 | Pantau perubahan dan kompilasi setiap file di bawah direktori |
| 86 | -v, --version Print version | 86 | -v, --version Tampilkan versi |
| 87 | - Read from standard in, print to standard out | 87 | - Baca dari standar input, tulis ke standar output |
| 88 | (Must be first and only argument) | 88 | (harus menjadi argumen pertama dan satu-satunya) |
| 89 | -- Same as '-' (kept for backward compatibility) | 89 | -- Sama dengan '-', dipertahankan untuk kompatibilitas lama |
| 90 | 90 | ||
| 91 | --target <version> Specify the Lua version that codes will be generated to | 91 | --target <versi> Tentukan versi Lua yang akan dihasilkan kodenya |
| 92 | (version can only be 5.1 to 5.5) | 92 | (versi hanya bisa dari 5.1 sampai 5.5) |
| 93 | --path <path_str> Append an extra Lua search path string to package.path | 93 | --path <path_str> Tambahkan path pencarian Lua tambahan ke package.path |
| 94 | --<key>=<value> Pass compiler option in key=value form (existing behavior) | 94 | --<key>=<value> Kirim opsi kompilasi dalam bentuk key=value (perilaku standar) |
| 95 | 95 | ||
| 96 | Execute without options to enter REPL, type symbol '$' | 96 | Jalankan tanpa opsi untuk masuk ke REPL, ketik simbol '$' |
| 97 | in a single line to start/stop multi-line mode | 97 | dalam satu baris untuk memulai/mengakhiri mode multi-baris |
| 98 | ``` | 98 | ``` |
| 99 | Use cases: | ||
| 100 | 99 | ||
| 101 | Recursively compile every YueScript file with extension **.yue** under current path: **yue .** | 100 | Gunakan kasus: |
| 102 | 101 | ||
| 103 | Compile and save results to a target path: **yue -t /target/path/ .** | 102 | Kompilasi semua file YueScript dengan ekstensi **.yue** secara rekursif di bawah path saat ini: **yue .** |
| 104 | 103 | ||
| 105 | Compile and reserve debug info: **yue -l .** | 104 | Kompilasi dan simpan hasil ke path target: **yue -t /target/path/ .** |
| 106 | 105 | ||
| 107 | Compile and generate minified codes: **yue -m .** | 106 | Kompilasi dan pertahankan info debug: **yue -l .** |
| 108 | 107 | ||
| 109 | Execute raw codes: **yue -e 'print 123'** | 108 | Kompilasi dan hasilkan kode yang diminisasi: **yue -m .** |
| 110 | 109 | ||
| 111 | Execute a YueScript file: **yue -e main.yue** | 110 | Eksekusi kode mentah: **yue -e 'print 123'** |
| 111 | |||
| 112 | Eksekusi file YueScript: **yue -e main.yue** | ||
