From 3e2722252c42578406a6eecb2f19f0594f5d05b5 Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Fri, 25 Apr 2025 12:50:44 +0200 Subject: [PATCH] [mod] --- source/main.ts | 31 ++++++++++++++++++++----------- source/types.ts | 10 +++++----- todo.md | 4 ++++ 3 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 todo.md diff --git a/source/main.ts b/source/main.ts index 850ef04..bcbebef 100644 --- a/source/main.ts +++ b/source/main.ts @@ -1,23 +1,23 @@ /* -This file is part of »munin«. +This file is part of »ivaldi«. Copyright 2025 'Fenris Wolf' -»munin« is free software: you can redistribute it and/or modify +»ivaldi« is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -»munin« is distributed in the hope that it will be useful, +»ivaldi« is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License -along with »munin«. If not, see . +along with »ivaldi«. If not, see . */ -namespace _munin +namespace _ivaldi { /** @@ -193,7 +193,7 @@ namespace _munin else { const content : string = await lib_plankton.file.read(args.data_path); const data_raw : any = lib_plankton.json.decode(content); - const data : _munin.type_data = { + const data : _ivaldi.type_data = { "version": data_raw["version"], "name": data_raw["name"], "libs": (data_raw["libs"] ?? {}), @@ -208,9 +208,9 @@ namespace _munin "libs": "libs", "temp": "temp", "build": "build", + "makefile": "/tmp", }, "command_tsc": "tsc", - "makefile_path": "/tmp/ivaldi-makefile", }; switch (args.action) { default: { @@ -472,17 +472,26 @@ namespace _munin "silent_actions": true, } ); + const makefile_path : string = lib_plankton.string.coin( + "{{directory}}/ivaldi-makefile-{{name}}", + { + "directory": conf.directories.makefile, + "name": data.name, + } + ); await lib_plankton.file.write( - conf.makefile_path, + makefile_path, makefile ); const command : string = lib_plankton.string.coin( "make -f {{path}}", { - "path": conf.makefile_path, + "path": makefile_path, } ); - await execute(command); + const result = await execute(command); + process.stdout.write(result.stdout + "\n"); + process.stderr.write(result.stderr + "\n"); return Promise.resolve(undefined); break; } @@ -496,7 +505,7 @@ namespace _munin } -_munin.main(process.argv.slice(2)) +_ivaldi.main(process.argv.slice(2)) .then(() => {}) .catch((reason) => {process.stderr.write(String(reason) + "\n");}) ; diff --git a/source/types.ts b/source/types.ts index 3d54710..d24d869 100644 --- a/source/types.ts +++ b/source/types.ts @@ -1,23 +1,23 @@ /* -This file is part of »munin«. +This file is part of »ivaldi«. Copyright 2025 'Fenris Wolf' -»munin« is free software: you can redistribute it and/or modify +»ivaldi« is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -»munin« is distributed in the hope that it will be useful, +»ivaldi« is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License -along with »munin«. If not, see . +along with »ivaldi«. If not, see . */ -namespace _munin +namespace _ivaldi { /** diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..2bcb53c --- /dev/null +++ b/todo.md @@ -0,0 +1,4 @@ +# ToDo + +- expose GNU Make output +