Fix broken paths for electron-builder

This commit is contained in:
Shawn 2019-03-05 01:47:55 -06:00
parent e0e9175238
commit 0affd8df7a
5 changed files with 25 additions and 6 deletions

View file

@ -4,6 +4,23 @@
"directories": { "directories": {
"output": "dist/electron" "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": [ "publish": [
{ {
"provider": "s3", "provider": "s3",

View file

@ -18,7 +18,7 @@
"name": "LBRY Inc.", "name": "LBRY Inc.",
"email": "hello@lbry.io" "email": "hello@lbry.io"
}, },
"main": "./dist/electron/main/main.js", "main": "./dist/electron/main.js",
"scripts": { "scripts": {
"compile:electron": "webpack --progress --config webpack.electron.config.js", "compile:electron": "webpack --progress --config webpack.electron.config.js",
"compile:web": "webpack --progress --config webpack.web.config.js", "compile:web": "webpack --progress --config webpack.web.config.js",
@ -34,7 +34,9 @@
"precommit": "lint-staged", "precommit": "lint-staged",
"preinstall": "yarn cache clean lbry-redux && yarn cache clean lbryinc", "preinstall": "yarn cache clean lbry-redux && yarn cache clean lbryinc",
"postinstall": "electron-builder install-app-deps && node build/downloadDaemon.js", "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": { "dependencies": {
"@babel/polyfill": "^7.2.5", "@babel/polyfill": "^7.2.5",

View file

@ -10,6 +10,6 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="text/javascript" src="http://localhost:8080/ui/bundle.js"></script> <script type="text/javascript" src="http://localhost:8080/ui.js"></script>
</body> </body>
</html> </html>

View file

@ -10,6 +10,6 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="text/javascript" src="ui/bundle.js"></script> <script type="text/javascript" src="ui.js"></script>
</body> </body>
</html> </html>

View file

@ -13,7 +13,7 @@ const mainConfig = {
main: './src/platforms/electron/index.js', main: './src/platforms/electron/index.js',
}, },
output: { output: {
filename: '[name]/bundle.js', filename: '[name].js',
path: __dirname + '/dist/electron', path: __dirname + '/dist/electron',
}, },
module: { module: {
@ -67,7 +67,7 @@ const renderConfig = {
ui: './src/ui/index.js', ui: './src/ui/index.js',
}, },
output: { output: {
filename: '[name]/bundle.js', filename: '[name].js',
path: __dirname + '/dist/electron', path: __dirname + '/dist/electron',
}, },
module: { module: {