Skip to content

Commit

Permalink
isDev -> is package
Browse files Browse the repository at this point in the history
  • Loading branch information
th-ch committed Jun 8, 2019
1 parent 147ac48 commit a85325f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require("path");

const electron = require("electron");
const isDev = require("electron-is-dev");
const is = require("electron-is");
const { autoUpdater } = require("electron-updater");

const { setApplicationMenu } = require("./menu");
Expand Down Expand Up @@ -57,7 +57,7 @@ function createMainWindow() {

injectCSS(win.webContents, path.join(__dirname, "youtube-music.css"));
win.webContents.on("did-finish-load", () => {
if (isDev) {
if (is.dev()) {
console.log("did finish load");
win.webContents.openDevTools();
}
Expand All @@ -73,7 +73,7 @@ function createMainWindow() {
});

win.webContents.on("did-fail-load", () => {
if (isDev) {
if (is.dev()) {
console.log("did fail load");
}
win.webContents.loadFile(path.join(__dirname, "error.html"));
Expand Down Expand Up @@ -129,7 +129,7 @@ app.on("activate", () => {
app.on("ready", () => {
setApplicationMenu();
mainWindow = createMainWindow();
if (!isDev) {
if (!is.dev()) {
autoUpdater.checkForUpdatesAndNotify();
autoUpdater.on("update-available", () => {
const dialogOpts = {
Expand Down
43 changes: 28 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"dependencies": {
"ad-block" : "^4.1.3",
"electron-debug" : "^2.0.0",
"electron-is-dev" : "^1.0.1",
"electron-is" : "^3.0.0",
"electron-localshortcut": "^3.1.0",
"electron-store" : "^2.0.0",
"electron-updater" : "^4.0.6"
Expand Down

0 comments on commit a85325f

Please sign in to comment.