Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
JhonatanMedeiros committed Jun 15, 2020
2 parents 6725a28 + 38b579a commit 3d34f9b
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 52 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [1.0.1](https://github.com/JhonatanMedeiros/webview-angular-electron/compare/1.0.0...1.0.1) (2020-06-15)


### Bug Fixes

* **electron-builder:** icon release not working ([325c986](https://github.com/JhonatanMedeiros/webview-angular-electron/commit/325c9867b23a1d88e06a53c9ff9475b8e14f29c6))



# 1.0.0 (2020-05-24)


Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
[![Angular Logo](https://www.vectorlogo.zone/logos/angular/angular-icon.svg)](https://angular.io/) [![Electron Logo](https://www.vectorlogo.zone/logos/electronjs/electronjs-icon.svg)](https://electronjs.org/)

![Maintained][maintained-badge]
[![Make a pull request][prs-badge]][prs]
[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)
<p align="center">
<img width="30%" src="./src/assets/icons/icon.png" alt="WebView Angular Electron"/>
</p>

<p align="center">
<a aria-label="Maintained" href="https://img.shields.io/badge/maintained-yes-brightgreen">
<img src="https://img.shields.io/badge/maintained-yes-brightgreen"></img>
</a>
<a aria-label="Make a pull request" href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat"></img>
</a>
<a aria-label="License" href="https://github.com/JhonatanMedeiros/webview-angular-electron/blob/master/LICENSE">
<img src="http://img.shields.io/badge/Licence-MIT-brightgreen.svg"></img>
</a>
</p>
<br>

# WebView Angular Electron

## 🖥 Introduction

The WebView Angular Electron is a Desktop Application, to manage multiples webview

WebView Angular Electron with Angular 9 and Electron 8 (Typescript + SASS + Hot Reload) for Desktop applications.

Currently, runs with:
Expand Down
51 changes: 51 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"appId": "com.jhonatanmedeiros.webview-angular-electron",
"productName": "Webview Angular Electron",
"artifactName": "WebviewAngularElectron-${version}-${os}-${arch}.${ext}",
"copyright": "Copyright © 2020 ${author}",
"directories": {
"output": "release/"
},
"files": [
"**/*",
"!**/*.ts",
"!*.code-workspace",
"!LICENSE.md",
"!package.json",
"!package-lock.json",
"!src/",
"!e2e/",
"!hooks/",
"!angular.json",
"!_config.yml",
"!karma.conf.js",
"!tsconfig.json",
"!tslint.json"
],
"win": {
"icon": "dist/webview-angular-electron/assets/icons",
"target": [
"nsis",
"msi"
]
},
"mac": {
"icon": "dist/webview-angular-electron/assets/icons",
"target": [
"dmg"
]
},
"linux": {
"icon": "dist/webview-angular-electron/assets/icons",
"category": "Development",
"packageCategory": "Development",
"target": [
"deb",
"snap",
"AppImage"
],
"desktop": {
"Encoding": "UTF-8"
}
}
}
14 changes: 7 additions & 7 deletions main-process/main-window/main-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export class MainWindow {

browserWindow: BrowserWindow = null;
serve = args.some(val => val === '--serve');
port = args.some(val => val === '--port');

constructor() {
this.createWindow();
Expand All @@ -31,11 +32,6 @@ export class MainWindow {
},
});

if (process.platform === 'linux') {
const icon = path.join(__dirname, '../../src/assets/electron-logo.png');
this.browserWindow.setIcon(icon);
}

this.initURL();

// Emitted when the window is closed.
Expand Down Expand Up @@ -66,11 +62,15 @@ export class MainWindow {
require('electron-reload')(__dirname + '../../', {
electron: require(`${__dirname}/../../node_modules/electron`)
});
this.browserWindow.loadURL('http://localhost:4200');
const icon = path.join(__dirname, '..', '..', 'src', 'assets', 'icons', 'icon.png');
this.browserWindow.setIcon(icon);
this.browserWindow.loadURL(`http://localhost:${this.port || 4200}`);

} else {
const icon = path.join(__dirname, '..', '..', 'dist', 'webview-angular-electron', 'assets', 'icons', 'icon.png');
this.browserWindow.setIcon(icon);
this.browserWindow.loadURL(url.format({
pathname: path.join(__dirname, '/../../dist/webview-angular-electron/index.html'),
pathname: path.join(__dirname, '..', '..', 'dist', 'webview-angular-electron', 'index.html'),
protocol: 'file:',
slashes: true
}));
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 5 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webview-angular-electron",
"version": "1.0.0",
"version": "1.0.1",
"description": "Manage multiples WebView with Angular e Electron",
"author": {
"email": "[email protected]",
Expand All @@ -10,17 +10,17 @@
"scripts": {
"postinstall": "electron-builder install-app-deps",
"ng": "ng",
"start": "npm-run-all -p electron:serve ng:serve",
"start": "npm-run-all -p electron:serve ng:serve --",
"build": "npm run electron:serve-tsc && ng build --base-href ./",
"build:dev": "npm run build --",
"build:prod": "npm run build -- --prod",
"ng:serve": "ng serve",
"ng:serve:web": "npm run ng:serve",
"ng:serve": "ng serve -- --port=4200",
"ng:serve:web": "npm run ng:serve --",
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve",
"electron:local": "npm run build:prod && electron .",
"electron:linux": "npm run build:prod && electron-builder build --linux",
"electron:windows": "npm run build:prod && electron-builder build --windows",
"electron:windows": "npm run build:prod && electron-builder build --win --x64",
"electron:mac": "npm run build:prod && electron-builder build --mac",
"release": "node scripts/release.js",
"release:changelog": "standard-changelog",
Expand Down Expand Up @@ -88,36 +88,5 @@
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS && npm run lint"
}
},
"build": {
"appId": "com.jhonatanmedeiros.webview-angular-electron",
"productName": "Webview Angular Electron",
"linux": {
"category": "Development",
"packageCategory": "Development",
"target": [
{
"target": "deb",
"arch": [
"x64"
]
},
{
"target": "snap",
"arch": [
"x64"
]
},
{
"target": "AppImage",
"arch": [
"x64"
]
}
],
"desktop": {
"Encoding": "UTF-8"
}
}
}
}
Binary file removed src/assets/electron-logo.png
Binary file not shown.
Binary file added src/assets/icons/1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon.icns
Binary file not shown.
Binary file added src/assets/icons/icon.ico
Binary file not shown.
Binary file added src/assets/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/favicon.ico
Binary file not shown.

0 comments on commit 3d34f9b

Please sign in to comment.