开发:仅在ue导出时使用asmonly

pull/2386/MERGE
ChenX 6 months ago
parent 38b7673c1f
commit 19c66a0bb8

@ -10,11 +10,11 @@ export function InitClipperCpp(): Promise<void>
{
clipperLib.loadNativeClipperLibInstanceAsync(
// let it autodetect which one to use, but also available WasmOnly and AsmJsOnly
//del_exp_start
//del_ue_exp_start
clipperLib.NativeClipperLibRequestedFormat.WasmOnly
//del_exp_end
//del_exp_start
//del_exp_end clipperLib.NativeClipperLibRequestedFormat.AsmJsOnly
//del_ue_exp_end
//del_ue_exp_start
//del_ue_exp_end clipperLib.NativeClipperLibRequestedFormat.AsmJsOnly
).then(c =>
{

@ -6,6 +6,7 @@ import util from 'util';
const exec = util.promisify(child_process.exec);
const REG_DEL = /\/\/del_exp_start(?:[\s\S])*?\/\/del_exp_end/g;
const REG_UE_DEL = /\/\/del_ue_exp_start(?:[\s\S])*?\/\/del_ue_exp_end/g;
async function main()
{
@ -36,6 +37,7 @@ async function main()
let length = str.length;
str = str.replaceAll(REG_DEL, "");
str = str.replaceAll(REG_UE_DEL, "");
if (length !== str.length)
await fs.writeFile(file, str);//替换

Loading…
Cancel
Save