Skip to content

Commit

Permalink
Removed debug and added define plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpigeon committed Feb 28, 2021
1 parent 192b7f9 commit 65b5a8b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions app/main.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ const createWindow = async () => {
mainWindow.show();
mainWindow.focus();
}
// Force dev console open for debug
mainWindow.webContents.openDevTools();
});

mainWindow.on('closed', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "BrainWaves",
"productName": "BrainWaves",
"version": "0.15.0-rc3",
"version": "0.15.0",
"description": "EEG Desktop Application",
"main": "./main.prod.js",
"type": "module",
Expand Down
14 changes: 9 additions & 5 deletions configs/webpack.config.main.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,21 @@ export default merge(baseConfig, {
* NODE_ENV should be production so that modules do not perform certain
* development checks
*
* The keys for emotiv SDK usage are piped into prod builds here via
* env variables set by secrets in Github Actions
*/
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
DEBUG_PROD: false,
START_MINIMIZED: false,
E2E_BUILD: false,
CLIENT_ID: process.env.CLIENT_ID,
CLIENT_SECRET: process.env.CLIENT_SECRET,
LICENSE_ID: process.env.LICENSE_ID,
}),
/**
* The keys for emotiv SDK usage are piped into prod builds here via
* env variables set by secrets in Github Actions
*/
new webpack.DefinePlugin({
CLIENT_ID: JSON.stringify(process.env.CLIENT_ID),
CLIENT_SECRET: JSON.stringify(process.env.CLIENT_SECRET),
LICENSE_ID: JSON.stringify(process.env.LICENSE_ID),
}),
],

Expand Down
3 changes: 0 additions & 3 deletions keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ const CLIENT_SECRET = process.env.CLIENT_SECRET; // Created through Cortex Apps
const LICENSE_ID = process.env.LICENSE_ID; // Visible on My Account page of Emotiv.com

const envVars = { CLIENT_ID, CLIENT_SECRET, LICENSE_ID };
Object.keys(envVars).forEach((k) =>
console.log(typeof envVars[k] === 'string')
);

module.exports = { CLIENT_ID, CLIENT_SECRET, LICENSE_ID };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "brainwaves",
"productName": "BrainWaves",
"version": "0.15.0-rc3",
"version": "0.15.0",
"description": "EEG Experiment Desktop Application",
"scripts": {
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
Expand Down

0 comments on commit 65b5a8b

Please sign in to comment.