mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
#12: Fix www.js in electron
This commit is contained in:
parent
2da9a2b03a
commit
a9e92e95b3
@ -33,7 +33,12 @@ async function copyFiles() {
|
||||
}
|
||||
|
||||
async function copyDirs() {
|
||||
const dirsToCopy = ["../common/images", "../client/libraries", "../server/db"];
|
||||
const dirsToCopy = [
|
||||
"../common/images",
|
||||
"../client/src",
|
||||
"../client/libraries",
|
||||
"../server/src/views",
|
||||
"../server/db"];
|
||||
for (const dir of dirsToCopy) {
|
||||
const destPath = path.join(DEST_DIR, trimRelativePath(dir));
|
||||
console.log(`Copying ${dir} -> ${destPath}`);
|
||||
@ -41,14 +46,6 @@ async function copyDirs() {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyClient() {
|
||||
const srcDirsToCopy = ["../client/src", "../server/src/views"];
|
||||
for (const dir of srcDirsToCopy) {
|
||||
console.log(`Copying ${dir}`);
|
||||
await fs.copy(dir, path.join(DEST_DIR_SRC, trimRelativePath(dir)));
|
||||
}
|
||||
}
|
||||
|
||||
async function copyNodeModules() {
|
||||
const nodeModulesFile = [
|
||||
"../client/node_modules/react/umd/react.production.min.js",
|
||||
@ -100,7 +97,6 @@ async function copyServerNodeModules() {
|
||||
try {
|
||||
copyFiles();
|
||||
copyDirs();
|
||||
copyClient();
|
||||
copyNodeModules();
|
||||
copyServerNodeModules();
|
||||
console.log("Copying complete!");
|
||||
|
@ -60,4 +60,4 @@ electron.app.on("will-quit", () => {
|
||||
// this is to disable electron warning spam in the dev console (local development only)
|
||||
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
||||
|
||||
require("./src/www.js");
|
||||
require("../../server/src/www.js"); // path is relative to dist/electron/src as defined in package.lock main
|
||||
|
Loading…
x
Reference in New Issue
Block a user