[
  {
    "path": ".gitignore",
    "content": "*.swp\nbuild\nnode_modules\ndist\nnpm-debug.log\n"
  },
  {
    "path": "README.md",
    "content": "# electron-boilerplate-sqlite\n\nTruly tiny boilerplate for an Electron app that includes SQLite support. See the [blog post](http://blog.arrayofbytes.co.uk/?p=379) for more.\n\n```\ngit clone https://github.com/sjmelia/electron-boilerplate-sqlite.git\ncd electron-boilerplate-sqlite\nnpm install\nnpm start\n```\n\n## Building a release package\n\nReleases can only be built on the target platform.\n\n`npm run release`\n\n## Using native modules\n\nIf you wish to use native modules, you must run `npm run postinstall` after first install of the module.\n\n## Thanks to...\n\n* Primary inspiration: https://github.com/szwacz/electron-boilerplate\n* SQLite JS: https://github.com/bytheway/electron-sqlite3/\n\n"
  },
  {
    "path": "app/app.js",
    "content": "const electron = require('electron');\n\nconst app = electron.app;\n\nvar BrowserWindow = electron.BrowserWindow;\n\nlet mainWindow;\n\napp.on('window-all-closed', function () {\n  app.quit();\n});\n\n// This method will be called when Electron has done everything\n// initialization and ready for creating browser windows.\napp.on('ready', function () {\n  // Create the browser window.\n  mainWindow = new BrowserWindow({\n    width: 800,\n    height: 600,\n    webPreferences: {\n      nodeIntegration: true\n    }\n  });\n\n  // and load the index.html of the app.\n  mainWindow.loadURL('file://' + __dirname + '/index.html');\n\n  // Open the DevTools.\n  mainWindow.webContents.openDevTools()\n\n  // Emitted when the window is closed.\n  mainWindow.on('closed', function () {\n    // Dereference the window object, usually you would store windows\n    // in an array if your app supports multi windows, this is the time\n    // when you should delete the corresponding element.\n    mainWindow = null;\n  });\n});"
  },
  {
    "path": "app/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n  </head>\n  <body>\n    <h1>electron-boilerplate-sqlite</h1>\n    <ul id=\"database\">\n    </ul>\n    <script>\n      var sqlite3 = require('sqlite3').verbose();\n      var db = new sqlite3.Database(':memory:');\n\n      db.serialize(function() {\n        db.run(\"CREATE TABLE lorem (info TEXT)\");\n\n        var stmt = db.prepare(\"INSERT INTO lorem VALUES (?)\");\n        for (var i = 0; i < 10; i++) {\n          stmt.run(\"Ipsum \" + i);\n        }\n\n        stmt.finalize();\n\n        var rows = document.getElementById(\"database\");\n        db.each(\"SELECT rowid AS id, info FROM lorem\", function(err, row) {\n          var item = document.createElement(\"li\");\n          item.textContent = \"\" + row.id + \": \" + row.info;\n          rows.appendChild(item);\n        });\n      });\n\n      db.close();\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"electron-boilerplate-sqlite\",\n  \"productName\": \"Electron boilerplate with sqlite\",\n  \"description\": \"Starter for your electron + sqlite application\",\n  \"version\": \"1.0.0\",\n  \"author\": \"Kolley Kibber <kolley.kibber@example.com>\",\n  \"copyright\": \"© 2016, Kibber Ltd.\",\n  \"homepage\": \"http://example.com\",\n  \"license\": \"MIT\",\n  \"main\": \"app/app.js\",\n  \"build\": {\n    \"appId\": \"com.example.electron-boilerplate-sqlite\",\n    \"files\": [\n      \"app/**/*\",\n      \"node_modules/**/*\",\n      \"package.json\"\n    ]\n  },\n  \"scripts\": {\n    \"postinstall\": \"install-app-deps\",\n    \"start\": \"electron .\",\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\n    \"release\": \"build\"\n  },\n  \"dependencies\": {\n    \"sqlite3\": \"^4.0.9\"\n  },\n  \"devDependencies\": {\n    \"electron\": \"^5.0.6\",\n    \"electron-builder\": \"^21.0.15\"\n  }\n}\n"
  }
]