Skip to content

Commit

Permalink
feat: add pwa support
Browse files Browse the repository at this point in the history
  • Loading branch information
4gray committed Jan 3, 2022
1 parent db0df76 commit 5a5085d
Show file tree
Hide file tree
Showing 14 changed files with 275 additions and 263 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
- name: Build and Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.7
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
Expand Down
23 changes: 13 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-electron": {
"iptvnator": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
Expand All @@ -26,7 +26,8 @@
"polyfills": "src/polyfills.ts",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.scss"
Expand All @@ -35,7 +36,9 @@
"customWebpackConfig": {
"path": "./angular.webpack.js",
"replaceDuplicatePlugins": true
}
},
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"configurations": {
"dev": {
Expand Down Expand Up @@ -91,24 +94,24 @@
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "angular-electron:build"
"browserTarget": "iptvnator:build"
},
"configurations": {
"dev": {
"browserTarget": "angular-electron:build:dev"
"browserTarget": "iptvnator:build:dev"
},
"web": {
"browserTarget": "angular-electron:build:web"
"browserTarget": "iptvnator:build:web"
},
"production": {
"browserTarget": "angular-electron:build:production"
"browserTarget": "iptvnator:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-electron:build"
"browserTarget": "iptvnator:build"
}
},
"test": {
Expand Down Expand Up @@ -142,7 +145,7 @@
}
}
},
"angular-electron-e2e": {
"iptvnator-e2e": {
"root": "e2e",
"projectType": "application",
"architect": {
Expand All @@ -157,7 +160,7 @@
}
}
},
"defaultProject": "angular-electron",
"defaultProject": "iptvnator",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
Expand Down
2 changes: 1 addition & 1 deletion e2e/main.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SpectronClient } from 'spectron';

import commonSetup from './common-setup';

describe('angular-electron App', function () {
describe('iptvnator App', function () {
commonSetup.apply(this);

let client: SpectronClient;
Expand Down
30 changes: 30 additions & 0 deletions ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
Loading

0 comments on commit 5a5085d

Please sign in to comment.