refactor: replace lodash.template with eta
test / test (push) Failing after 3m8s

This commit is contained in:
2026-10-25 14:58:31 +03:00
parent bf9ac8a8bf
commit f45effe571
9 changed files with 789 additions and 808 deletions
+9 -5
View File
@@ -1,12 +1,12 @@
import dateformat from "dateformat";
import gulp from "gulp";
import gulpClean from "gulp-clean";
import template from "lodash.template";
import os from "os";
import type { Task } from "undertaker";
import { Builder, Project } from ".";
import { System } from "../common/system";
import { Config, type ConfigParams } from "../core/config";
import template from "../common/template";
import { Config, type ConfigParams, type SignKey } from "../core/config";
import { Sdk } from "../core/sdk";
import { Platform } from "../core/type";
import { Haxe } from "../impl/haxe";
@@ -16,7 +16,7 @@ export interface PresetConfig {
BuildDir?: string;
Develop?: boolean;
UseRuffle?: boolean;
Key?: any;
Key?: SignKey;
}
export const DEFAULT_CONFIG: PresetConfig = {
@@ -44,9 +44,13 @@ export class Preset {
}
private fillPreset(preset: ProjectPreset): ProjectPreset {
const configTemplate = template(JSON.stringify(preset));
return JSON.parse(
configTemplate({ config: this.config, package: this.packageInfo, env: process.env, dateformat: dateformat }),
template.renderString(JSON.stringify(preset), {
config: this.config,
package: this.packageInfo,
env: process.env,
dateformat: dateformat,
}),
);
}