Release builds with electron-builder
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# compiled output
|
# compiled output
|
||||||
/dist
|
/dist
|
||||||
|
/release
|
||||||
/tmp
|
/tmp
|
||||||
/out-tsc
|
/out-tsc
|
||||||
# Only exists if Bazel was run
|
# Only exists if Bazel was run
|
||||||
|
|||||||
@@ -59,12 +59,14 @@
|
|||||||
"with": "src/environments/environment.prod.ts"
|
"with": "src/environments/environment.prod.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"baseHref": "./",
|
||||||
"optimization": true,
|
"optimization": true,
|
||||||
"outputHashing": "all",
|
"outputHashing": "all",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"extractCss": true,
|
"extractCss": true,
|
||||||
"namedChunks": false,
|
"namedChunks": false,
|
||||||
"aot": true,
|
"aot": true,
|
||||||
|
"watch": false,
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
"buildOptimizer": true
|
"buildOptimizer": true
|
||||||
|
|||||||
29
electron-builder.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"productName": "Bridge",
|
||||||
|
"directories": {
|
||||||
|
"output": "release/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist/**/*"
|
||||||
|
],
|
||||||
|
"win": {
|
||||||
|
"icon": "dist/assets/images/system/icons/win/icon.ico",
|
||||||
|
"compression": "store",
|
||||||
|
"target": [
|
||||||
|
"portable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mac": {
|
||||||
|
"icon": "dist/assets/images/system/icons/mac/icon.icns",
|
||||||
|
"compression": "maximum",
|
||||||
|
"target": [
|
||||||
|
"dmg"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"compression": "maximum",
|
||||||
|
"target": [
|
||||||
|
"AppImage"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
1097
package-lock.json
generated
22
package.json
@@ -1,14 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "bridge",
|
"name": "bridge",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
|
"description": "A handy CloneHero library management tool with built in chart searching and downloading.",
|
||||||
|
"homepage": "https://github.com/maximegris/angular-electron",
|
||||||
|
"author": {
|
||||||
|
"name": "Geo",
|
||||||
|
"email": "geomitron@gmail.com"
|
||||||
|
},
|
||||||
"main": "dist/electron/main.js",
|
"main": "dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "run-p serve:angular serve:electron",
|
"start": "run-p serve:angular serve:electron",
|
||||||
"serve:electron": "wait-on http-get://localhost:4200/ && tsc -p tsconfig.electron.json && electron . --serve",
|
|
||||||
"serve:angular": "ng serve",
|
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist release",
|
||||||
"prod:windows": ""
|
"build:windows": "ng build -c production && npm run build:electron && electron-builder build --windows",
|
||||||
|
"serve:angular": "ng serve",
|
||||||
|
"serve:electron": "wait-on http-get://localhost:4200/ && npm run build:electron && electron . --dev",
|
||||||
|
"build:electron": "tsc -p tsconfig.electron.json"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -31,12 +38,13 @@
|
|||||||
"@angular/language-service": "~8.2.14",
|
"@angular/language-service": "~8.2.14",
|
||||||
"@types/node": "~8.9.4",
|
"@types/node": "~8.9.4",
|
||||||
"electron": "^7.1.11",
|
"electron": "^7.1.11",
|
||||||
"npm-run-all": "^4.1.5",
|
"electron-builder": "^22.3.2",
|
||||||
"wait-on": "^4.0.0",
|
|
||||||
"electron-reload": "^1.5.0",
|
"electron-reload": "^1.5.0",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
"rimraf": "^3.0.1",
|
"rimraf": "^3.0.1",
|
||||||
"ts-node": "~7.0.0",
|
"ts-node": "~7.0.0",
|
||||||
"tslint": "~5.15.0",
|
"tslint": "~5.15.0",
|
||||||
"typescript": "~3.5.3"
|
"typescript": "~3.5.3",
|
||||||
|
"wait-on": "^4.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/assets/images/bridge-animation.gif
Normal file
|
After Width: | Height: | Size: 266 KiB |
BIN
src/assets/images/logo-sm.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
16
src/assets/images/logo.svg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 835 445" style="enable-background:new 0 0 835 445;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M5,5L5,5v180c0,41.4,33.6,75,75,75l0,0l0,0c41.4,0,75-33.6,75-75l0,0c0-41.4-33.6-75-75-75l0,0
|
||||||
|
c-41.4,0-75,33.6-75,75"/>
|
||||||
|
<path class="st0" d="M185,260L185,260v-75c0-41.4,33.6-75,75-75"/>
|
||||||
|
<path class="st0" d="M290,110L290,110v150"/>
|
||||||
|
<path class="st0" d="M470,185c0-41.4-33.6-75-75-75l0,0c-41.4,0-75,33.6-75,75l0,0c0,41.4,33.6,75,75,75l0,0
|
||||||
|
C436.4,260,470,226.4,470,185L470,185V5"/>
|
||||||
|
<path class="st0" d="M650,185c0,41.4-33.6,75-75,75l0,0c-41.4,0-75-33.6-75-75s33.6-75,75-75S650,143.6,650,185L650,185v180
|
||||||
|
c0,41.4-33.6,75-75,75l0,0c-41.4,0-75-33.6-75-75"/>
|
||||||
|
<path class="st0" d="M680,185L680,185h150c0-41.4-33.6-75-75-75S680,143.6,680,185L680,185c0,41.4,33.6,75,75,75"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/images/placeholder.jpg
Normal file
|
After Width: | Height: | Size: 389 KiB |
BIN
src/assets/images/system/icon.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
src/assets/images/system/icons/mac/icon.icns
Normal file
BIN
src/assets/images/system/icons/png/1024x1024.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
src/assets/images/system/icons/png/128x128.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/images/system/icons/png/16x16.png
Normal file
|
After Width: | Height: | Size: 794 B |
BIN
src/assets/images/system/icons/png/24x24.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/images/system/icons/png/256x256.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/images/system/icons/png/32x32.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/images/system/icons/png/48x48.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/images/system/icons/png/512x512.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
src/assets/images/system/icons/png/64x64.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
src/assets/images/system/icons/win/icon.ico
Normal file
|
After Width: | Height: | Size: 353 KiB |
@@ -7,7 +7,7 @@ import * as url from 'url'
|
|||||||
|
|
||||||
let mainWindow: BrowserWindow
|
let mainWindow: BrowserWindow
|
||||||
const args = process.argv.slice(1)
|
const args = process.argv.slice(1)
|
||||||
const isDevBuild = args.some(val => val == '--serve')
|
const isDevBuild = args.some(val => val == '--dev')
|
||||||
|
|
||||||
restrictToSingleInstance()
|
restrictToSingleInstance()
|
||||||
handleOSXWindowClosed()
|
handleOSXWindowClosed()
|
||||||
@@ -103,7 +103,7 @@ function createBrowserWindow() {
|
|||||||
function getLoadUrl() {
|
function getLoadUrl() {
|
||||||
return url.format({
|
return url.format({
|
||||||
protocol: isDevBuild ? 'http:' : 'file:',
|
protocol: isDevBuild ? 'http:' : 'file:',
|
||||||
pathname: isDevBuild ? '//localhost:4200/' : path.join(__dirname, 'index.html'),
|
pathname: isDevBuild ? '//localhost:4200/' : path.join(__dirname, '..', 'index.html'),
|
||||||
slashes: true
|
slashes: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,6 @@ function setUpDevTools() {
|
|||||||
require('electron-reload')(__dirname, {
|
require('electron-reload')(__dirname, {
|
||||||
electron: require(`${__dirname}/../../node_modules/electron`)
|
electron: require(`${__dirname}/../../node_modules/electron`)
|
||||||
})
|
})
|
||||||
mainWindow.loadURL('http://localhost:4200')
|
|
||||||
|
|
||||||
mainWindow.webContents.openDevTools()
|
mainWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,6 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts"
|
"src/**/*.ts"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../out-tsc/app",
|
|
||||||
"types": []
|
|
||||||
},
|
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true
|
"strictInjectionParameters": true
|
||||||
|
|||||||
@@ -16,9 +16,7 @@
|
|||||||
"es2016",
|
"es2016",
|
||||||
"es2015",
|
"es2015",
|
||||||
"dom"
|
"dom"
|
||||||
],
|
]
|
||||||
|
|
||||||
"outDir": "dist/electron"
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/electron/**/*.ts"
|
"src/electron/**/*.ts"
|
||||||
|
|||||||