remove env

This commit is contained in:
Sean Yesmunt 2019-02-19 15:18:20 -05:00
parent d1f56f40bc
commit 9346150514
3 changed files with 3 additions and 12 deletions

View file

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "electron ./src/main", "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" "postinstall": "node build/download-sdk.js"
}, },
"dependencies": { "dependencies": {

View file

@ -1,7 +1,6 @@
const { BrowserWindow } = require("electron"); const { BrowserWindow } = require("electron");
const url = require("url"); const url = require("url");
const path = require("path"); 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 // 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. // 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. // Emitted when the window is closed.
mainWindow.on("closed", function() { mainWindow.on("closed", function() {
// Dereference the window object, usually you would store windows // Dereference the window object, usually you would store windows

View file

@ -4,12 +4,9 @@ const path = require("path");
const findProcess = require("find-process"); const findProcess = require("find-process");
const createWindow = require("./create-window"); const createWindow = require("./create-window");
const SDK = require("./sdk"); const SDK = require("./sdk");
const IS_DEV = process.env.NODE_ENV === "development";
// Auto-reload when we make changes // Simple auto reload
if (IS_DEV) {
require("electron-reload")(__dirname); require("electron-reload")(__dirname);
}
// This method will be called when Electron has finished // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.