From f262252ade99fc1f2a915d6ec438c6143bd0c35b Mon Sep 17 00:00:00 2001 From: Goh Jia Hao Date: Thu, 26 May 2016 22:50:40 +0800 Subject: [PATCH] Implement downloading of files - Fixes #185 --- app/package.json | 1 + app/src/main.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/package.json b/app/package.json index 623af3e..0b78cf4 100644 --- a/app/package.json +++ b/app/package.json @@ -4,6 +4,7 @@ "description": "Placeholder for the nativefier cli to override with a target url", "main": "lib/main.js", "dependencies": { + "electron-dl": "^1.1.0", "electron-window-state": "^3.0.3", "source-map-support": "^0.4.0", "wurl": "^2.1.0" diff --git a/app/src/main.js b/app/src/main.js index 271599a..bda3cfa 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -6,9 +6,12 @@ import createLoginWindow from './components/login/loginWindow'; import createMainWindow from './components/mainWindow/mainWindow'; import helpers from './helpers/helpers'; import inferFlash from './helpers/inferFlash'; +import electronDownload from 'electron-dl'; const {isOSX} = helpers; +electronDownload(); + const APP_ARGS_FILE_PATH = path.join(__dirname, '..', 'nativefier.json'); const appArgs = JSON.parse(fs.readFileSync(APP_ARGS_FILE_PATH, 'utf8'));