Repository: sjmelia/electron-boilerplate-sqlite Branch: master Commit: 0073d097b086 Files: 5 Total size: 3.3 KB Directory structure: gitextract_ge1s6pv5/ ├── .gitignore ├── README.md ├── app/ │ ├── app.js │ └── index.html └── package.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.swp build node_modules dist npm-debug.log ================================================ FILE: README.md ================================================ # electron-boilerplate-sqlite Truly tiny boilerplate for an Electron app that includes SQLite support. See the [blog post](http://blog.arrayofbytes.co.uk/?p=379) for more. ``` git clone https://github.com/sjmelia/electron-boilerplate-sqlite.git cd electron-boilerplate-sqlite npm install npm start ``` ## Building a release package Releases can only be built on the target platform. `npm run release` ## Using native modules If you wish to use native modules, you must run `npm run postinstall` after first install of the module. ## Thanks to... * Primary inspiration: https://github.com/szwacz/electron-boilerplate * SQLite JS: https://github.com/bytheway/electron-sqlite3/ ================================================ FILE: app/app.js ================================================ const electron = require('electron'); const app = electron.app; var BrowserWindow = electron.BrowserWindow; let mainWindow; app.on('window-all-closed', function () { app.quit(); }); // This method will be called when Electron has done everything // initialization and ready for creating browser windows. app.on('ready', function () { // Create the browser window. mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true } }); // and load the index.html of the app. mainWindow.loadURL('file://' + __dirname + '/index.html'); // Open the DevTools. mainWindow.webContents.openDevTools() // Emitted when the window is closed. mainWindow.on('closed', function () { // Dereference the window object, usually you would store windows // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. mainWindow = null; }); }); ================================================ FILE: app/index.html ================================================

electron-boilerplate-sqlite

================================================ FILE: package.json ================================================ { "name": "electron-boilerplate-sqlite", "productName": "Electron boilerplate with sqlite", "description": "Starter for your electron + sqlite application", "version": "1.0.0", "author": "Kolley Kibber ", "copyright": "© 2016, Kibber Ltd.", "homepage": "http://example.com", "license": "MIT", "main": "app/app.js", "build": { "appId": "com.example.electron-boilerplate-sqlite", "files": [ "app/**/*", "node_modules/**/*", "package.json" ] }, "scripts": { "postinstall": "install-app-deps", "start": "electron .", "test": "echo \"Error: no test specified\" && exit 1", "release": "build" }, "dependencies": { "sqlite3": "^4.0.9" }, "devDependencies": { "electron": "^5.0.6", "electron-builder": "^21.0.15" } }