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%>