@tilua/compiler 6.0.1 → 7.0.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 +69 -22
- package/dist/{chunk-EQE22LX7.js → chunk-NM3EVX2J.js} +569 -83
- package/dist/cli.cjs +572 -92
- package/dist/cli.js +4 -10
- package/dist/index.cjs +569 -84
- package/dist/index.d.cts +165 -115
- package/dist/index.d.ts +165 -115
- package/dist/index.js +1 -2
- package/package.json +2 -2
- package/runtime/json.luau +255 -0
package/dist/cli.js
CHANGED
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
bundle,
|
|
4
4
|
resolveConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NM3EVX2J.js";
|
|
6
6
|
|
|
7
7
|
// src/cli.ts
|
|
8
8
|
import { mkdirSync, writeFileSync } from "fs";
|
|
9
9
|
import { basename, dirname, join, relative, resolve } from "path";
|
|
10
|
-
var usage = "usage: tilua <entry> [--out <file>] [--output single|chunks|modules] [--config <tilua.config.json>] [--noCheck]
|
|
10
|
+
var usage = "usage: tilua <entry> [--out <file>] [--output single|chunks|modules] [--config <tilua.config.json>] [--noCheck]";
|
|
11
11
|
var args = process.argv.slice(2);
|
|
12
12
|
var entry;
|
|
13
13
|
var out;
|
|
14
14
|
var config;
|
|
15
15
|
var typeCheck = true;
|
|
16
|
-
var buildTarget;
|
|
17
16
|
var output;
|
|
18
17
|
for (let i = 0; i < args.length; i++) {
|
|
19
18
|
const arg = args[i];
|
|
@@ -21,12 +20,8 @@ for (let i = 0; i < args.length; i++) {
|
|
|
21
20
|
else if (arg === "--config") config = args[++i];
|
|
22
21
|
else if (arg === "--noCheck") typeCheck = false;
|
|
23
22
|
else if (arg === "--target") {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
console.error(`--target must be 'luau' or 'lua51', not '${value}'`);
|
|
27
|
-
process.exit(2);
|
|
28
|
-
}
|
|
29
|
-
buildTarget = value;
|
|
23
|
+
console.error(`--target is gone: the output runs on Lua 5.1 to 5.4, LuaJIT and Luau, and a library says what more its Lua has \u2014 add "luau" to the config's 'types'`);
|
|
24
|
+
process.exit(2);
|
|
30
25
|
} else if (arg === "--output") {
|
|
31
26
|
const value = args[++i];
|
|
32
27
|
if (value !== "single" && value !== "chunks" && value !== "modules") {
|
|
@@ -52,7 +47,6 @@ async function main(from) {
|
|
|
52
47
|
entry: from,
|
|
53
48
|
config,
|
|
54
49
|
typeCheck,
|
|
55
|
-
target: buildTarget,
|
|
56
50
|
output: mode,
|
|
57
51
|
outFile: entryFile !== void 0 ? basename(entryFile) : void 0
|
|
58
52
|
});
|