36 lines
958 B
JavaScript
36 lines
958 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: "./platforms/hybrid/framework/server/index.js",
|
|
platform: "node",
|
|
target: "node12",
|
|
keepNames: true,
|
|
external: [ ]
|
|
});
|
|
|
|
fse.copySync("./framework/configs", "./platforms/hybrid/framework/configs");
|
|
|
|
fse.copySync("./assets/bundle.js", "./platforms/hybrid/assets/bundle.js");
|
|
|
|
fse.copySync("framework/node_modules/better-sqlite3/node_modules/better-sqlite3/build/Release/", "./platforms/hybrid/build/");
|
|
|
|
fse.copySync("./assets/production", "./platforms/hybrid/assets/production");
|