upgrade APIlite and change build backend use TypeScript instead of JavaScript

This commit is contained in:
2026-02-13 10:40:32 +01:00
parent d13d861113
commit ae7f05786d
5 changed files with 211 additions and 166 deletions

View File

@ -9,7 +9,7 @@ $backend_api = new TPsoft\Nutrio\API('typescript', 'import.meta.env.VITE_BACKEND
$output = ob_get_contents();
ob_end_clean();
$ts_path = realpath(__DIR__ . '/../../frontend/src').'/BackendAPI.js';
$ts_path = realpath(__DIR__ . '/../../frontend/src').'/BackendAPI.ts';
$suc = file_put_contents($ts_path, $output);
if ($suc === false) {
echo "✗ TypeScript store into file failed\n";