@thigasdevelopment/luam 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -147,7 +147,7 @@ See [Editor support](#editor-support) for the compatibility matrix and manual in
147
147
  > **[Quick start](https://thigasdevelopment.github.io/luam/en/guide/quick-start)**
148
148
  > · [Início rápido](https://thigasdevelopment.github.io/luam/pt-br/guide/quick-start)
149
149
 
150
- **1. Scaffold.** `init` writes exactly one file, `luam.json`. No framework, no
150
+ **1. Scaffold.** `init` writes exactly one file, `.luam.manifest`. No framework, no
151
151
  example tree, nothing to delete.
152
152
 
153
153
  ```bash
@@ -161,7 +161,7 @@ the environment**: `src/server` is server-side, `src/client` is client-side,
161
161
 
162
162
  ```
163
163
  my-resource/
164
- ├── luam.json
164
+ ├── .luam.manifest
165
165
  └── src/
166
166
  ├── shared/config.luam
167
167
  ├── server/main.luam
@@ -215,11 +215,12 @@ refresh
215
215
  start my-resource
216
216
  ```
217
217
 
218
- **5. Iterate.** Point `luam.json` at your server and let `dev` build, sync,
218
+ **5. Iterate.** Point `.luam.manifest` at your server and let `dev` build, sync,
219
219
  restart, and stream resource logs on every save:
220
220
 
221
- ```json
222
- { "name": "my-resource", "serverPath": "C:/MTA Server" }
221
+ ```luam
222
+ name = 'my-resource'
223
+ serverPath = 'C:/MTA Server'
223
224
  ```
224
225
 
225
226
  ```bash
@@ -234,19 +235,19 @@ luam dev
234
235
  > **[CLI commands](https://thigasdevelopment.github.io/luam/en/tooling/cli)**
235
236
  > · [Comandos da CLI](https://thigasdevelopment.github.io/luam/pt-br/tooling/cli)
236
237
 
237
- Project commands read `luam.json` from the current directory or from `--cwd`.
238
+ Project commands read `.luam.manifest` from the current directory or from `--cwd`.
238
239
  `setup`, `doctor`, and `init` do not require an existing project.
239
240
 
240
241
  ### `luam init`
241
242
 
242
- Scaffolds `luam.json` and stops. The resource name comes from `--name`, or from
243
+ Scaffolds `.luam.manifest` and stops. The resource name comes from `--name`, or from
243
244
  the directory you are in.
244
245
 
245
246
  ```bash
246
247
  luam init --name gamemode-race
247
248
  ```
248
249
 
249
- An existing `luam.json` is kept and reported — pass `--force` to overwrite it.
250
+ An existing `.luam.manifest` is kept and reported — pass `--force` to overwrite it.
250
251
 
251
252
  ### `luam setup`
252
253
 
@@ -341,7 +342,7 @@ your MTA server, restarts it, and repeats all of that on every save.
341
342
  luam ensure
342
343
  ```
343
344
 
344
- How much it does depends on what `luam.json` gives it:
345
+ How much it does depends on what `.luam.manifest` gives it:
345
346
 
346
347
  | Configured | What `ensure` does |
347
348
  | --- | --- |
@@ -352,18 +353,17 @@ How much it does depends on what `luam.json` gives it:
352
353
  To get the restart, add an `http` transport pointing at a resource on your server
353
354
  that exports `refreshResources` and `restartResource`:
354
355
 
355
- ```json
356
- {
357
- "name": "my-resource",
358
- "serverPath": "C:/MTA Server",
359
- "transport": {
360
- "kind": "http",
361
- "host": "127.0.0.1",
362
- "port": 22005,
363
- "resource": "luam-sync",
364
- "username": "luam",
365
- "passwordEnv": "LUAM_MTA_PASSWORD"
366
- }
356
+ ```luam
357
+ name = 'my-resource'
358
+ serverPath = 'C:/MTA Server'
359
+
360
+ transport = {
361
+ kind = 'http',
362
+ host = '127.0.0.1',
363
+ port = 22005,
364
+ resource = 'luam-sync',
365
+ username = 'luam',
366
+ passwordEnv = 'LUAM_MTA_PASSWORD',
367
367
  }
368
368
  ```
369
369
 
@@ -388,8 +388,8 @@ a deploy script wants.
388
388
 
389
389
  | Option | Meaning |
390
390
  | --- | --- |
391
- | `--cwd <path>` | Project directory holding `luam.json`. Defaults to the current directory |
392
- | `--config <path>` | Load this file instead of `luam.json` |
391
+ | `--cwd <path>` | Project directory holding `.luam.manifest`. Defaults to the current directory |
392
+ | `--manifest <path>` | Load this file instead of `.luam.manifest` |
393
393
  | `--name <name>` | Resource name for `init` |
394
394
  | `--force` | Let `init` overwrite a file that exists |
395
395
  | `--watch` / `--no-watch` | Keep `ensure` or `dev` watching, or run it once. Both watch by default |
@@ -411,7 +411,7 @@ Progress is painted on stderr and the report goes to stdout, so redirecting
411
411
  stdout captures the report alone. Output drops all escape sequences when the
412
412
  stream is not a terminal — a CI log stays readable.
413
413
 
414
- ### `luam.json`
414
+ ### `.luam.manifest`
415
415
 
416
416
  Only `name` is required.
417
417
 
@@ -436,10 +436,10 @@ Paths must stay inside their base directory — an absolute path or a `..` segme
436
436
  is rejected.
437
437
 
438
438
  Every field, the transport in detail, `.env` handling and declaration files:
439
- **[luam.json](https://thigasdevelopment.github.io/luam/en/tooling/luam-json)**
439
+ **[.luam.manifest](https://thigasdevelopment.github.io/luam/en/tooling/luam-manifest)**
440
440
  and
441
441
  [Configuration fields](https://thigasdevelopment.github.io/luam/en/reference/configuration-fields)
442
- · [luam.json](https://thigasdevelopment.github.io/luam/pt-br/tooling/luam-json)
442
+ · [.luam.manifest](https://thigasdevelopment.github.io/luam/pt-br/tooling/luam-manifest)
443
443
  · also in [`packages/cli/README.md`](packages/cli/README.md).
444
444
 
445
445
  ---
@@ -468,10 +468,10 @@ interface Command { # compile-only, never emitted
468
468
  class VIPPlayer extends Player implements Command {
469
469
  level: number = 1
470
470
 
471
- constructor(name: string, level: number) {
471
+ constructor = function (name: string, level: number)
472
472
  self:super(name)
473
473
  self.level = level
474
- }
474
+ end
475
475
  }
476
476
 
477
477
  local vip = new VIPPlayer('Thigas', 2)
@@ -639,7 +639,7 @@ pnpm --filter luam bundle
639
639
  code --extensionDevelopmentPath=packages/vscode
640
640
  ```
641
641
 
642
- The extension activates when the workspace holds a `luam.json` or any `.luam`
642
+ The extension activates when the workspace holds a `.luam.manifest` or any `.luam`
643
643
  file, so open your resource folder as the workspace root.
644
644
 
645
645
  ### Commands and settings