From 37cfc670cf5e55df0122dbab3d80a137afb0c0f1 Mon Sep 17 00:00:00 2001 From: Koda Lee Date: Sun, 13 Feb 2022 00:32:49 -0800 Subject: [PATCH] Moved files into proper locations --- dispose.js | 12 ++++++++++++ index.js | 6 +++--- package.json | 13 +++---------- .../all_platform_logo_dark.svg | 0 eula.html => src/eula.html | 0 icon.png => src/icon.png | Bin icon@512.png => src/icon@512.png | Bin index.html => src/index.html | 8 ++++---- pause@512.png => src/pause@512.png | Bin play@512.png => src/play@512.png | Bin settings.html => src/settings.html | 0 11 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 dispose.js rename all_platform_logo_dark.svg => src/all_platform_logo_dark.svg (100%) rename eula.html => src/eula.html (100%) rename icon.png => src/icon.png (100%) rename icon@512.png => src/icon@512.png (100%) rename index.html => src/index.html (92%) rename pause@512.png => src/pause@512.png (100%) rename play@512.png => src/play@512.png (100%) rename settings.html => src/settings.html (100%) diff --git a/dispose.js b/dispose.js new file mode 100644 index 0000000..ba9a473 --- /dev/null +++ b/dispose.js @@ -0,0 +1,12 @@ +const fs = require("fs"), target = "dist/"; + + +console.log(`attempting to clean up the ${target} folder...`) + +fs.rmdir(target, {recursive: true, force: true}, (err) => { + if (err) { + console.error(`failed to clean up ${target}... more details should be in the thrown stack trace`) + throw err; + }; + console.log(`succesfully cleaned up the ${target} folder. you may now build the app`) +}) diff --git a/index.js b/index.js index 688736c..f6b0959 100644 --- a/index.js +++ b/index.js @@ -31,12 +31,12 @@ const createWindow = () => { var currentData = null win.setTitle("Initializing... - YouTube Music") win.setMenuBarVisibility(false); - console.log("Loading... | "+`file://${__dirname}/index.html`) + console.log("Loading... | "+`file://${__dirname}/src/index.html`) win.once("ready-to-show", () => { win.show(); console.log("Done! No more normal outputs. Only verbose and errors") ipcMain.on("injectReady", () => { - win.webContents.send("inject", {settings: `file://${__dirname}/settings.html`}); + win.webContents.send("inject", {settings: `file://${__dirname}/src/settings.html`}); }); client.updatePresence({ @@ -118,7 +118,7 @@ const createWindow = () => { }); }) - win.loadURL(`file://${__dirname}/index.html`) + win.loadURL(`file://${__dirname}/src/index.html`) win.once("close", () => { app.quit(); diff --git a/package.json b/package.json index 8ad8ce0..8cdc0a1 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,8 @@ "main": "index.js", "scripts": { "start": "electron-forge start", - "fstart": "electron start", - "pack": "electron-builder --dir", - "dist": "electron-builder --x64", - "package": "electron-forge package", - "make": "electron-forge make" + "build": "electron-builder --x64", + "dispose": "node dispose.js" }, "keywords": [ "koda", @@ -48,12 +45,8 @@ "files": [ "css/**", "js/**", - "eula.html", - "index.html", + "src/**", "index.js", - "all_platform_logo_dark.svg", - "icon.png", - "update.gif", "preload.js", "settings.html" ], diff --git a/all_platform_logo_dark.svg b/src/all_platform_logo_dark.svg similarity index 100% rename from all_platform_logo_dark.svg rename to src/all_platform_logo_dark.svg diff --git a/eula.html b/src/eula.html similarity index 100% rename from eula.html rename to src/eula.html diff --git a/icon.png b/src/icon.png similarity index 100% rename from icon.png rename to src/icon.png diff --git a/icon@512.png b/src/icon@512.png similarity index 100% rename from icon@512.png rename to src/icon@512.png diff --git a/index.html b/src/index.html similarity index 92% rename from index.html rename to src/index.html index 5fa7b7e..daab1b8 100644 --- a/index.html +++ b/src/index.html @@ -36,8 +36,8 @@ transform: scale(1.1); } - - + +
@@ -63,8 +63,8 @@

- - + +