This commit is contained in:
fenris 2026-09-18 02:31:28 +02:00
parent 6300c16485
commit d3d24c75a0
3 changed files with 23 additions and 19 deletions

View file

@ -150,11 +150,13 @@ namespace _ivaldi
{
"declaration": declaration = false,
"libs": libs = [],
"head": head = "tsc"
}
:
{
declaration ?: boolean;
libs ?: Array<string>;
head ?: string;
}
=
{
@ -162,8 +164,9 @@ namespace _ivaldi
) : string
{
return lib_plankton.string.coin(
"tsc{{libs}} {{source_paths}} --outFile {{target_path}}{{declaration}}",
"{{head}}{{libs}} {{source_paths}} --outFile {{target_path}}{{declaration}}",
{
"head": head,
"libs": (
libs
.map(

View file

@ -218,6 +218,12 @@ namespace _ivaldi
??
"node"
),
"settings": {
"typescript": {
"command": (((data_raw["settings"] ?? {})["typescript"] ?? {})["command"] ?? "tsc"),
"libs": (((data_raw["settings"] ?? {})["typescript"] ?? {})["libs"] ?? ["es2020"]),
},
},
"directories": {
"lib": (
(data_raw["misc"] ?? {})["lib"]
@ -250,13 +256,6 @@ namespace _ivaldi
lib_plankton.string.coin("/tmp/", {})
),
},
"commands": {
"typescript_compile": (
(data_raw["commands"] ?? {})["typescript_compile"]
??
"tsc"
),
},
"libs": (data_raw["libs"] ?? {}),
"core": data_raw["core"],
"apps": (
@ -267,7 +266,7 @@ namespace _ivaldi
"sources": app_raw["sources"],
"additional_dependencies": (app_raw["additional_dependencies"] ?? []),
"destination": (app_raw["destination"] ?? "{{project}}-{{app}}"),
"shebang": (app_raw["shebang"] ?? null),
"head": (app_raw["head"] ?? null),
"executable": (app_raw["executable"] ?? false),
}
)
@ -533,8 +532,9 @@ namespace _ivaldi
["$^"],
path_core_implementation,
{
"libs": ["es2020"],
"declaration": true,
"head": data.settings.typescript.command,
"libs": data.settings.typescript.libs,
}
),
]
@ -610,10 +610,8 @@ namespace _ivaldi
["$^"],
"$@",
{
/**
* @todo var
*/
"libs": ["es2020"],
"head": data.settings.typescript.command,
"libs": data.settings.typescript.libs,
}
),
]
@ -638,7 +636,7 @@ namespace _ivaldi
[
_ivaldi.command_log(lib_plankton.string.coin("app:{{name}} | linking …", {"name": app.name})),
_ivaldi.command_mkdir("$(dir $@)"),
lib_plankton.string.coin("echo '{{head}}' > {{path}}", {"head": (app.shebang ?? ""), "path": path_result}),
lib_plankton.string.coin("echo '{{head}}' > {{path}}", {"head": (app.head ?? ""), "path": path_result}),
_ivaldi.command_cat(["$^"], "$@", {"append": true}),
]
)

View file

@ -46,7 +46,7 @@ namespace _ivaldi
sources : Array<string>;
additional_dependencies : Array<string>;
destination : string;
shebang : (null | string);
head : (null | string);
executable : boolean;
};
@ -57,6 +57,12 @@ namespace _ivaldi
version : string;
name : string;
target : ("node" | "web");
settings : {
typescript : {
command : string;
libs : Array<string>;
};
};
directories : {
lib : string;
source : string;
@ -65,9 +71,6 @@ namespace _ivaldi
build : string;
makefile : string;
};
commands : {
typescript_compile : string;
};
libs : {
plankton : (null | Array<string>);
node : (null | Array<string>);