Skip to content

Commit 7cd5139

Browse files
committed
features
1 parent b4a6471 commit 7cd5139

3 files changed

Lines changed: 6 additions & 23 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.4.0",
44
"description": "A Sticky Note Application.",
55
"author": "B. Ramnath Shenoy <bekalshenoy@gmail.com>",
6-
"main": "./src/background.js",
6+
"main": "background.js",
77
"scripts": {
88
"build": "vue-cli-service electron:build --config",
99
"postinstall": "electron-builder install-app-deps",
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@vue/cli-service": "latest",
25-
"electron": "latest",
25+
"electron": "v6",
2626
"electron-builder": "latest",
2727
"vue": "latest",
2828
"vue-cli-plugin-electron-builder": "latest",

src/background.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ SOFTWARE. */
2222

2323
"use strict";
2424

25-
let { app, BrowserWindow, ipcMain } = require("electron");
26-
let {
27-
createProtocol,
28-
installVueDevtools
29-
} = require("vue-cli-plugin-electron-builder/lib");
30-
let AutoLaunch = require("auto-launch");
31-
let { setTimeout } = require("timers");
25+
import { app, BrowserWindow, ipcMain } from "electron";
26+
import { createProtocol } from "vue-cli-plugin-electron-builder/lib";
27+
import AutoLaunch from "auto-launch";
28+
import { setTimeout } from "timers";
3229

3330
require("electron-context-menu")({
3431
prepend: () => [
@@ -127,15 +124,6 @@ app.on("activate", () => {
127124
}
128125
});
129126

130-
app.on("ready", async () => {
131-
if (isDevelopment && !process.env.IS_TEST) {
132-
await installVueDevtools();
133-
}
134-
setTimeout(() => {
135-
createWindow();
136-
}, 500);
137-
});
138-
139127
if (isDevelopment) {
140128
if (process.platform === "win32") {
141129
process.on("message", data => {

vue.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@ module.exports = {
44
filenameHashing: false,
55
devServer: {
66
proxy: "http://localhost:8080"
7-
},
8-
pluginOptions: {
9-
electronBuilder: {
10-
mainProcessFile: "src/background.js"
11-
}
127
}
138
};

0 commit comments

Comments
 (0)