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
+2 -5
View File
@@ -1,9 +1,9 @@
import fs from "fs";
import fse from "fs-extra";
import template from "lodash.template";
import os from "os";
import path from "path";
import exec from "../common/exec";
import template from "../common/template";
import type { Config } from "../core/config";
import { Sdk } from "../core/sdk";
@@ -43,10 +43,7 @@ export class InnoSetup extends Sdk {
pack(config: Config, source: string, output: string) {
const buildDir = path.join(os.tmpdir(), "build", config.name, "innosetup");
const appTemplate = template(
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/windows/app.iss"), "utf8"),
);
const app = appTemplate({ ...config, buildDir: buildDir, output: output });
const app = template.render("windows/app.iss", { ...config, buildDir: buildDir, output: output });
fse.ensureDirSync(buildDir);
fse.copySync(`${source}`, `${buildDir}`);