Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkp committed Mar 31, 2016
1 parent 4c71696 commit 2486038
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 13 additions & 1 deletion card-explorer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
'use strict';

process.env.NODE_ENV = process.env.NODE_ENV || 'production';


const electron = require('electron');

const smartcard = require('smartcard');
const tlv = require('tlv');
const hexify = require('hexify');


if (process.env.NODE_ENV === 'development') {
require('electron-debug')();
}


// Module to control application life.
const app = electron.app;
// Module to create native browser window.
Expand All @@ -30,7 +39,10 @@ function createWindow() {
// Open the DevTools.
let webContents = mainWindow.webContents;

webContents.openDevTools();
//webContents.openDevTools();
if (process.env.NODE_ENV === 'development') {
webContents.openDevTools();
}

// Emitted when the window is closed.
mainWindow.on('closed', function () {
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
"license": "MIT",
"main": "card-explorer.js",
"scripts": {
"start": "electron card-explorer.js",
"start": "cross-env NODE_ENV=development electron card-explorer.js",
"compile": "webpack",
"compile:watch": "webpack -w",
"bump": "salita && npm i",
"build:all": "electron-packager . --overwrite --out='build' --icon='tomkp.icns' --all --appname='Card Explorer'",
"build:win": "electron-packager . --overwrite --out='build' --platform=win32 --appname='Card Explorer' --arch=x64",
"build:osx": "electron-packager . --overwrite --out='build' --icon='tomkp.icns' --platform=darwin --appname='Card Explorer' --arch=x64",
"build:all": "cross-env NODE_ENV=development electron-packager . --overwrite --out='build' --icon='tomkp.icns' --all --appname='Card Explorer'",
"build:win": "cross-env NODE_ENV=development electron-packager . --overwrite --out='build' --platform=win32 --appname='Card Explorer' --arch=x64",
"build:osx": "cross-env NODE_ENV=development electron-packager . --overwrite --out='build' --icon='tomkp.icns' --platform=darwin --appname='Card Explorer' --arch=x64",
"publish:win": "npm run build:win && zip -r -X './website/CardExplorerWin.zip' './build/Card Explorer-win32-x64' && surge website explorer.surge.sh",
"publish:osx": "npm run build:osx && zip -r -X './website/CardExplorerOSx.zip' './build/Card Explorer-darwin-x64' && surge website explorer.surge.sh"
},
"dependencies": {
"babel-polyfill": "^6.7.4",
"card-reader": "^1.0.3",
"cross-env": "^1.0.7",
"electron-debug": "^0.5.2",
"emv": "^1.0.6",
"es6-promise": "^3.1.2",
"hexify": "^1.0.1",
Expand Down

0 comments on commit 2486038

Please sign in to comment.