This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unhandled from 'electron-unhandled'; | |
unhandled({ | |
logger: (error) => { | |
// Handle all your errors here. | |
}, | |
showDialog: !IS_PRODUCTION | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const { RENDERER_INPUT, MAIN_INPUT, BUILD_OUTPUT } = require('./bin/config'); | |
// Define a base configuration. | |
const baseConfig = (env) => ({ | |
plugins: [new webpack.DefinePlugin({ | |
IS_PRO: env.IS_PRO ? true : false, | |
IS_PROD: env.IS_PROD ? true : false, | |
IS_PACKAGED: env.IS_PACKAGED ? true : false | |
})], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Main process | |
export const createSeeThroughWindow = () => { | |
const w = new BrowserWindow({ transparent: true }); | |
w.setIgnoreMouseEvents(true); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { app } from 'electron'; | |
import path from 'path'; | |
import { | |
WIDEVINE_PATH, | |
WIDEVINE_VERSION, | |
PEPPERFLASH_PATH, | |
PEPPERFLASH_VERSION | |
} from './config'; | |
app.commandLine.appendSwitch('widevine-cdm-path', path.join(__dirname, WIDEVINE_PATH)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { powerSaveBlocker} from 'electron'; | |
let clipboardValue; | |
powerSaveBlocker.start('prevent-app-suspension'); | |
setInterval(() => { | |
clipboardValue = clipboard.readText(); | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const windowExists = (w) => { | |
if (!w || (w && w.isDestroyed())) { | |
return false; | |
} | |
return true; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'path'; | |
import glob from 'glob'; | |
import fs from 'fs-extra'; | |
export const cleanLanguages = (buildPath) => { | |
// Target only English and French. | |
const lprojRegEx = /(en|fr)\.lproj/g; | |
const cwd = path.join(buildPath, `Fenêtre.app/Contents/Resources`); | |
const lproj = glob.sync('*.lproj', { cwd }); | |
const proms = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Testing File" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am yoannmoinet on github. | |
* I am yoannmoinet (https://keybase.io/yoannmoinet) on keybase. | |
* I have a public key whose fingerprint is 1E06 D01B CA96 C8CD 06F7 E262 3A23 D567 FF21 3F18 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nb [int] the number of line to get from the stack | |
function logStack (nb) { | |
try { | |
throw new Error(); | |
} catch (e) { | |
var stack = e.stack.match(/(https?:\/\/[\w.:0-9\/]+)/g); | |
if (nb === undefined) { | |
nb = stack.length - 2; | |
} | |
console.log( |