From 9346150514e64978140bbc838c336befe9c4e297 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 19 Feb 2019 15:18:20 -0500 Subject: [PATCH] remove env --- package.json | 2 +- src/main/create-window.js | 6 ------ src/main/index.js | 7 ++----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index f97ff32..278e389 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "start": "electron ./src/main", - "dev": "NODE_ENV=development electron ./src/main/index.js", + "dev": "electron ./src/main/index.js", "postinstall": "node build/download-sdk.js" }, "dependencies": { diff --git a/src/main/create-window.js b/src/main/create-window.js index bbb7d0b..87f1d7c 100644 --- a/src/main/create-window.js +++ b/src/main/create-window.js @@ -1,7 +1,6 @@ const { BrowserWindow } = require("electron"); const url = require("url"); const path = require("path"); -const IS_DEV = process.env.NODE_ENV === "development"; // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. @@ -20,11 +19,6 @@ function createWindow() { }) ); - // Open the DevTools. - // if (IS_DEV) { - // mainWindow.webContents.openDevTools(); - // } - // Emitted when the window is closed. mainWindow.on("closed", function() { // Dereference the window object, usually you would store windows diff --git a/src/main/index.js b/src/main/index.js index cc42741..d4825e2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -4,12 +4,9 @@ const path = require("path"); const findProcess = require("find-process"); const createWindow = require("./create-window"); const SDK = require("./sdk"); -const IS_DEV = process.env.NODE_ENV === "development"; -// Auto-reload when we make changes -if (IS_DEV) { - require("electron-reload")(__dirname); -} +// Simple auto reload +require("electron-reload")(__dirname); // This method will be called when Electron has finished // initialization and is ready to create browser windows.