Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

desktop: add logs in build script for debugging

Abdullah Atta5d07db366bbf
diff --git a/apps/desktop/scripts/build.mjs b/apps/desktop/scripts/build.mjs
index ced3c1761..205d0e137 100644
--- a/apps/desktop/scripts/build.mjs
+++ b/apps/desktop/scripts/build.mjs
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+console.log("starting build...");
import path from "path";
import fs from "fs/promises";
import { existsSync } from "fs";
@@ -26,6 +27,7 @@ import * as childProcess from "child_process";
import { fileURLToPath } from "url";
import { patchBetterSQLite3 } from "./patch-better-sqlite3.mjs";
+console.log("imports done...");
const args = yargs(process.argv);
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -34,9 +36,20 @@ const skipTscBuild = args.skipTscBuild || false;
const webAppPath = path.resolve(path.join(__dirname, "..", "..", "web"));
+console.log("loaded args", {
+ args,
+ __filename,
+ __dirname,
+ root,
+ skipTscBuild,
+ webAppPath
+});
await fs.rm(path.join(root, "build"), { force: true, recursive: true });
+console.log("removed build folder");
+
if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) {
+ console.log("rebuilding...");
await exec(
"npx nx build:desktop @notesnook/web",
path.join(__dirname, "..", "..", "..")