Skip to content

Commit

Permalink
fix: remove unnecessary env.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin authored and kambydyne committed Oct 5, 2021
1 parent a1f6124 commit df2cd7b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
3 changes: 0 additions & 3 deletions electron/env.example.ts

This file was deleted.

8 changes: 0 additions & 8 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ moduleAlias.addAliases({
'@root': `${__dirname}/../`,
});

try {
// eslint-disable-next-line global-require
const {env} = require('./env');
process.env.NODE_ENV = !env || env === 'production' ? 'production' : 'development';
} catch (error) {
process.env.NODE_ENV = 'production';
}

import {app, BrowserWindow, nativeImage, ipcMain, dialog} from 'electron';
import * as path from 'path';
import installExtension, {REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS} from 'electron-devtools-installer';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
"build": "craco --max_old_space_size=4096 build",
"test": "craco test --watchAll=false",
"postinstall": "electron-builder install-app-deps",
"electron:dev": "concurrently \"cross-env BROWSER=none npm run start\" \"wait-on http://localhost:3000 && tsc -p electron -w\" \"wait-on http://localhost:3000 && tsc -p electron && electron .\"",
"electron:debug": "concurrently \"cross-env BROWSER=none npm run start\" \"wait-on http://localhost:3000 && tsc -p electron -w\" \"wait-on http://localhost:3000 && tsc -p electron && electron --remote-debugging-port=9223 .\"",
"electron:dev": "concurrently \"cross-env BROWSER=none npm run start\" \"wait-on http://localhost:3000 && tsc -p electron -w\" \"wait-on http://localhost:3000 && tsc -p electron && cross-env NODE_ENV=development electron .\"",
"electron:debug": "concurrently \"cross-env BROWSER=none npm run start\" \"wait-on http://localhost:3000 && tsc -p electron -w\" \"wait-on http://localhost:3000 && tsc -p electron && cross-env NODE_ENV=development electron --remote-debugging-port=9223 .\"",
"electron:build": "npm run build && tsc -p electron && electron-builder --publish \"never\"",
"electron:build:mac": "npm run build && tsc -p electron && electron-builder --publish \"never\" && (ls -alh dist | grep Monokle && du -sh dist/mac || true)",
"electron:build:ci": "npm run build && tsc -p electron",
Expand Down

0 comments on commit df2cd7b

Please sign in to comment.