diff --git a/main.js b/main.js index 8e4d66d..e5b1da4 100644 --- a/main.js +++ b/main.js @@ -28,7 +28,7 @@ function createWindow () { // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. mainWindow = null - }) + }); mainWindow.webContents.openDevTools() } diff --git a/package.json b/package.json index 54deb0c..54a3f64 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "A minimal Electron application", "main": "main.js", "scripts": { - "start": "electron ." + "start": "electron .", + "package":"electron-packager . rikaze --platform=win32 --arch=x64 --icon=computer.ico --out=./out --asar --app-version=0.0.1 --overwrite --ignore=node_modules" }, "repository": "https://github.com/electron/electron-quick-start", "keywords": [ diff --git a/renderer.js b/renderer.js index 5186123..eb9c51c 100644 --- a/renderer.js +++ b/renderer.js @@ -4,7 +4,7 @@ // `nodeIntegration` is turned off. Use `preload.js` to // selectively enable features needed in the rendering // process. - - -const { BrowserWindow } = require('electron'); +let myNotification = new Notification('标题', { + body: '通知正文内容' +}); diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000