Files
Unify/framework/npmScripts/esbuild/esbuild.native.js
2025-12-25 11:16:59 +01:00

33 lines
766 B
JavaScript

/*
Copyright (c) 2020, 2023, The Unified Company.
This code is part of Unify.
This program is free software; you can redistribute it and/or modify
it under the terms of the ESA Software Community License - Strong Copyleft,
https://unifyjs.org
*/
import esbuild from "../../node_modules/esbuild/node_modules/esbuild/lib/main.js";
import fse from "fs-extra";
esbuild.build({
bundle: true,
entryPoints: ["./framework/server/index.js"],
outfile: "./native/framework/server/index.js",
platform: "node",
target: "node12",
keepNames: true,
external: [ ]
});
fse.copySync("./assets/bundle.js", "./native/assets/bundle.js");
fse.copySync("framework/node_modules/better-sqlite3/node_modules/better-sqlite3/build/Release/", "./native/build/");