From 5b1440a186ec3ce45704b4fe2b87e82efc2f4c2d Mon Sep 17 00:00:00 2001 From: Srijon Saha <33412649+srijonsaha@users.noreply.github.com> Date: Sun, 28 Jun 2020 00:22:46 -0700 Subject: [PATCH] Update electron demo (#2027) * Update electron demo to version 9 [ci skip] Co-authored-by: Ian Jennings --- demos/electron/README.md | 8 +++++--- demos/electron/index.html | 1 + demos/electron/index.js | 30 ++++++++++-------------------- demos/electron/main.js | 18 ++++++++++++------ demos/electron/package.json | 7 +++++-- 5 files changed, 33 insertions(+), 31 deletions(-) diff --git a/demos/electron/README.md b/demos/electron/README.md index d0b6d74..355bb1b 100644 --- a/demos/electron/README.md +++ b/demos/electron/README.md @@ -1,9 +1,11 @@ # Electron This library is compatible with Electron and should just work out of the box. -The demonstration uses Electron 1.7.5. The library is added via `require` from -the render process. It can also be required from the main process, as shown in -this demo to render a version string in the About dialog on OSX. +The demonstration uses Electron 9.0.5. The library is added via `require` from +the renderer process. Note that Electron now requires `nodeIntegration: true` +in order to `require('XLSX')` in the renderer process. It can also be required +from the main process, as shown in this demo to render a version string in the +About dialog on OSX. The standard HTML5 `FileReader` techniques from the browser apply to Electron. This demo includes a drag-and-drop box as well as a file input box, mirroring diff --git a/demos/electron/index.html b/demos/electron/index.html index 3bd3559..d0fa5db 100644 --- a/demos/electron/index.html +++ b/demos/electron/index.html @@ -4,6 +4,7 @@ + SheetJS Electron Demo