From 769127d6f02776aafa0d7a2d66b749eb6ce358c2 Mon Sep 17 00:00:00 2001 From: shmyga Date: Sun, 1 Nov 2026 16:19:02 +0300 Subject: [PATCH] fix(template): fix project.hxml template --- src/common/template.ts | 1 + template/project.hxml | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/common/template.ts b/src/common/template.ts index 9da5d6c..53d5ea4 100644 --- a/src/common/template.ts +++ b/src/common/template.ts @@ -7,6 +7,7 @@ const __dirname = path.dirname(__filename); export default new Eta({ autoFilter: true, + escapeFunction: (val: unknown): string => String(val), filterFunction: (val: unknown): string => (val === null || val === undefined ? "" : String(val)), useWith: true, views: path.join(__dirname, "template"), diff --git a/template/project.hxml b/template/project.hxml index 4354982..a93f63b 100644 --- a/template/project.hxml +++ b/template/project.hxml @@ -1,11 +1,16 @@ <% sources.forEach(function(item) { %> --cp "<%=item%>"<% }); %> +-cp "<%=item%>" +<% }); %> <% libs.forEach(function(item) { %> --lib <%=item.name%>:<%=item.version.split('@').shift()%><% }); %> +-lib <%=item.name%>:<%=item.version.split('@').shift()%> + +<% }); %> <% macros.forEach(function(item) { %> ---macro "<%=item%>"<% }); %> +--macro "<%=item%>" +<% }); %> <% flags.forEach(function(item) { %> --D <%=item%><% }); %> +-D <%=item%> +<% }); %> -main <%=main%>