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,6 +1,6 @@
import fs from "fs";
import template from "lodash.template";
import path from "path";
import template from "../../../common/template";
import type { Config } from "../../../core/config";
import { Platform } from "../../../core/type";
import { Packer } from "../../core/packer";
@@ -14,10 +14,7 @@ export class FlashHTMLPacker extends Packer {
call() {
const target = this.targetPath;
const indexTemplate = template(
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/flash/index.html"), "utf8"),
);
const index = indexTemplate(this.config);
const index = template.render("flash/index.html", this.config);
fs.writeFileSync(path.resolve(target, "index.html"), index);
fs.copyFileSync(path.resolve(import.meta.dirname, "..", "template/flash/swf.js"), path.resolve(target, "swf.js"));
return Promise.resolve();