├── .gitignore ├── res └── icon.ico ├── .eslintrc ├── .compilerc ├── src └── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | out 3 | -------------------------------------------------------------------------------- /res/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/akc-desktop-app/master/res/icon.ico -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-airbnb", 3 | "rules": { 4 | "import/extensions": 0, 5 | "import/no-extraneous-dependencies": 0, 6 | "import/no-unresolved": [2, { "ignore": ["electron"] }], 7 | "linebreak-style": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.compilerc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "development": { 4 | "application/javascript": { 5 | "presets": [ 6 | [ 7 | "env", 8 | { 9 | "targets": { 10 | "electron": 2 11 | } 12 | } 13 | ], 14 | "react" 15 | ], 16 | "plugins": [ 17 | "transform-async-to-generator" 18 | ], 19 | "sourceMaps": "inline" 20 | } 21 | }, 22 | "production": { 23 | "application/javascript": { 24 | "presets": [ 25 | [ 26 | "env", 27 | { 28 | "targets": { 29 | "electron": 2 30 | } 31 | } 32 | ], 33 | "react" 34 | ], 35 | "plugins": [ 36 | "transform-async-to-generator" 37 | ], 38 | "sourceMaps": "none" 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { app, BrowserWindow, Menu } from 'electron'; 2 | 3 | if(require('electron-squirrel-startup')) app.quit(); 4 | 5 | // Keep a global reference of the window object, if you don't, the window will 6 | // be closed automatically when the JavaScript object is garbage collected. 7 | let mainWindow; 8 | 9 | const createWindow = () => { 10 | Menu.setApplicationMenu(null); 11 | 12 | // Create the browser window. 13 | mainWindow = new BrowserWindow({ 14 | nodeIntegration: false, 15 | backgroundColor: '#f1efc0', 16 | show: false, 17 | width: 540, 18 | height: 580, 19 | useContentSize: true, 20 | icon: './res/icon.ico' 21 | }); 22 | 23 | mainWindow.once('ready-to-show', () => { 24 | mainWindow.show(); 25 | }); 26 | 27 | // Emitted when the window is closed. 28 | mainWindow.on('closed', () => { 29 | // Dereference the window object, usually you would store windows 30 | // in an array if your app supports multi windows, this is the time 31 | // when you should delete the corresponding element. 32 | mainWindow = null; 33 | }); 34 | 35 | // and load the main page of the app. 36 | mainWindow.loadURL('https://akc.link/'); 37 | }; 38 | 39 | // This method will be called when Electron has finished 40 | // initialization and is ready to create browser windows. 41 | // Some APIs can only be used after this event occurs. 42 | app.on('ready', createWindow); 43 | 44 | // Quit when all windows are closed. 45 | app.on('window-all-closed', () => { 46 | // On OS X it is common for applications and their menu bar 47 | // to stay active until the user quits explicitly with Cmd + Q 48 | if (process.platform !== 'darwin') { 49 | app.quit(); 50 | } 51 | }); 52 | 53 | app.on('activate', () => { 54 | // On OS X it's common to re-create a window in the app when the 55 | // dock icon is clicked and there are no other windows open. 56 | if (mainWindow === null) { 57 | createWindow(); 58 | } 59 | }); 60 | 61 | // In this file you can include the rest of your app's specific main process 62 | // code. You can also put them in separate files and import them here. 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "akc-desktop-app", 3 | "productName": "ArrowKeyControl", 4 | "version": "1.0.0", 5 | "description": "A fun game.", 6 | "main": "src/index.js", 7 | "scripts": { 8 | "start": "electron-forge start", 9 | "package": "electron-forge package", 10 | "make": "electron-forge make", 11 | "lint": "eslint src" 12 | }, 13 | "keywords": [], 14 | "author": "Brenton Fletcher", 15 | "license": "MIT", 16 | "config": { 17 | "forge": { 18 | "make_targets": { 19 | "win32": [ 20 | "squirrel" 21 | ], 22 | "darwin": [ 23 | "zip" 24 | ], 25 | "linux": [ 26 | "deb", 27 | "rpm" 28 | ] 29 | }, 30 | "electronPackagerConfig": { 31 | "packageManager": "yarn", 32 | "icon": "./res/icon.ico" 33 | }, 34 | "electronWinstallerConfig": { 35 | "name": "ArrowKeyControl", 36 | "setupIcon": "./res/icon.ico", 37 | "iconUrl": "https://akc.link/icon.ico" 38 | }, 39 | "electronInstallerDebian": {}, 40 | "electronInstallerRedhat": {}, 41 | "github_repository": { 42 | "owner": "", 43 | "name": "" 44 | }, 45 | "windowsStoreConfig": { 46 | "packageName": "", 47 | "name": "akcdesktopapp" 48 | } 49 | } 50 | }, 51 | "dependencies": { 52 | "electron-compile": "^6.4.3", 53 | "electron-squirrel-startup": "^1.0.0" 54 | }, 55 | "devDependencies": { 56 | "babel-plugin-transform-async-to-generator": "^6.24.1", 57 | "babel-preset-env": "^1.7.0", 58 | "babel-preset-react": "^6.24.1", 59 | "electron-forge": "^5.2.2", 60 | "electron-prebuilt-compile": "2.0.7", 61 | "eslint": "3", 62 | "eslint-config-airbnb": "15", 63 | "eslint-plugin-import": "2", 64 | "eslint-plugin-jsx-a11y": "5", 65 | "eslint-plugin-react": "7" 66 | } 67 | } 68 | --------------------------------------------------------------------------------