From 0affd8df7aa59730ec0db212cfd492203dee97ed Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 5 Mar 2019 01:47:55 -0600 Subject: [PATCH] Fix broken paths for electron-builder --- electron-builder.json | 17 +++++++++++++++++ package.json | 6 ++++-- static/index.dev.html | 2 +- static/index.html | 2 +- webpack.electron.config.js | 4 ++-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/electron-builder.json b/electron-builder.json index c6cff35e8..9c85063c0 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -4,6 +4,23 @@ "directories": { "output": "dist/electron" }, + "files": [ + { + "from": "dist/electron", + "to": "./", + "filter": ["!dist/!electron/**/*"] + }, + { + "from": "dist/electron/static", + "to": "./", + "filter": ["!dist/!electron/static/**/*"] + }, + { + "from": "dist/electron/ui", + "to": "./", + "filter": ["!dist/!electron/ui/**/*"] + } + ], "publish": [ { "provider": "s3", diff --git a/package.json b/package.json index b7ce8c4e3..a3d795f0b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "name": "LBRY Inc.", "email": "hello@lbry.io" }, - "main": "./dist/electron/main/main.js", + "main": "./dist/electron/main.js", "scripts": { "compile:electron": "webpack --progress --config webpack.electron.config.js", "compile:web": "webpack --progress --config webpack.web.config.js", @@ -34,7 +34,9 @@ "precommit": "lint-staged", "preinstall": "yarn cache clean lbry-redux && yarn cache clean lbryinc", "postinstall": "electron-builder install-app-deps && node build/downloadDaemon.js", - "run:electron": "electron ./dist/electron/main/bundle.js" + "run:electron": "electron ./dist/electron/main.js", + "pack": "electron-builder --dir", + "dist": "electron-builder" }, "dependencies": { "@babel/polyfill": "^7.2.5", diff --git a/static/index.dev.html b/static/index.dev.html index 87576e7da..91284276a 100644 --- a/static/index.dev.html +++ b/static/index.dev.html @@ -10,6 +10,6 @@
- + diff --git a/static/index.html b/static/index.html index 2d50b115e..3082653c0 100644 --- a/static/index.html +++ b/static/index.html @@ -10,6 +10,6 @@
- + diff --git a/webpack.electron.config.js b/webpack.electron.config.js index 01afe3d91..07e1b4ccf 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -13,7 +13,7 @@ const mainConfig = { main: './src/platforms/electron/index.js', }, output: { - filename: '[name]/bundle.js', + filename: '[name].js', path: __dirname + '/dist/electron', }, module: { @@ -67,7 +67,7 @@ const renderConfig = { ui: './src/ui/index.js', }, output: { - filename: '[name]/bundle.js', + filename: '[name].js', path: __dirname + '/dist/electron', }, module: {