From 5540bffe6d2499b1557b566e94cc540e3628a6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Mon, 7 Aug 2023 10:50:07 +0200 Subject: [PATCH] [mod] stub for output "frontend-typescript" --- source/main.ts | 1 + source/outputs/frontend_typescript.ts | 22 ++++++++++++++++++++++ tools/makefile | 1 + 3 files changed, 24 insertions(+) create mode 100644 source/outputs/frontend_typescript.ts diff --git a/source/main.ts b/source/main.ts index 5aaa8ae..45ca69a 100644 --- a/source/main.ts +++ b/source/main.ts @@ -9,6 +9,7 @@ async function main( "database-sqlite": output_database_sqlite, "database-mysql": output_database_mysql, "backend-typescript": output_backend_typescript, + "frontend-typescript": output_frontend_typescript, }; const arg_handler = new lib_plankton.args.class_handler( diff --git a/source/outputs/frontend_typescript.ts b/source/outputs/frontend_typescript.ts new file mode 100644 index 0000000..6e1e6be --- /dev/null +++ b/source/outputs/frontend_typescript.ts @@ -0,0 +1,22 @@ +namespace _sindri.outputs.frontend.typescript +{ + + /** + */ + export function render( + input_data + ) : string + { + return lib_plankton.string.coin( + "const sindri_abstract = {{value}};", + { + "value": JSON.stringify(input_data), + } + ); + } + +} + +const output_frontend_typescript : type_output = { + "render": _sindri.outputs.frontend.typescript.render, +}; diff --git a/tools/makefile b/tools/makefile index 86c0dd6..013367e 100644 --- a/tools/makefile +++ b/tools/makefile @@ -22,6 +22,7 @@ source/outputs/jsonschema.ts \ source/outputs/database_sqlite.ts \ source/outputs/database_mysql.ts \ source/outputs/backend_typescript.ts \ +source/outputs/frontend_typescript.ts \ source/conf.ts \ source/main.ts @ ${cmd_log} "compiling …"