-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(service-worker): add basic service-worker config
- Loading branch information
1 parent
94caa8f
commit 50a8871
Showing
14 changed files
with
86 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/service-worker/config/schema.json", | ||
"index": "/index.html", | ||
"assetGroups": [ | ||
{ | ||
"name": "app", | ||
"installMode": "prefetch", | ||
"resources": { | ||
"files": ["/favicon.ico", "/index.csr.html", "/index.html", "/manifest.webmanifest", "/*.css", "/*.js"] | ||
} | ||
}, | ||
{ | ||
"name": "assets", | ||
"installMode": "lazy", | ||
"updateMode": "prefetch", | ||
"resources": { | ||
"files": ["/assets/**/*.(png|svg|mp3)"] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,49 @@ | ||
{ | ||
"name": "retroski", | ||
"version": "1.1.2", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch --configuration development", | ||
"test": "ng test", | ||
"lint": "biome lint --write src", | ||
"format": "biome format --write src", | ||
"postbuild": "cp src/.htaccess dist/" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^19.0.5", | ||
"@angular/common": "^19.0.5", | ||
"@angular/compiler": "^19.0.5", | ||
"@angular/core": "^19.0.5", | ||
"@angular/forms": "^19.0.5", | ||
"@angular/platform-browser": "^19.0.5", | ||
"@angular/platform-browser-dynamic": "^19.0.5", | ||
"@angular/router": "^19.0.5", | ||
"date-fns": "4.1.0", | ||
"dexie": "^4.0.9", | ||
"excalibur": "0.30.2", | ||
"pocketbase": "0.22.1", | ||
"rxjs": "~7.8.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "~0.15.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^19.0.5", | ||
"@angular/cli": "^19.0.5", | ||
"@angular/compiler-cli": "^19.0.5", | ||
"@biomejs/biome": "1.9.4", | ||
"@types/jasmine": "~5.1.0", | ||
"@types/node": "22.10.2", | ||
"jasmine-core": "~5.1.0", | ||
"karma": "~6.4.0", | ||
"karma-chrome-launcher": "~3.2.0", | ||
"karma-coverage": "~2.2.0", | ||
"karma-jasmine": "~5.1.0", | ||
"karma-jasmine-html-reporter": "~2.1.0", | ||
"typescript": "~5.6.3", | ||
"vite": "^5.0.0" | ||
} | ||
} | ||
"name": "retroski", | ||
"version": "1.1.2", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch --configuration development", | ||
"test": "ng test", | ||
"lint": "biome lint --write src", | ||
"format": "biome format --write src", | ||
"postbuild": "cp src/.htaccess dist/" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^19.0.5", | ||
"@angular/common": "^19.0.5", | ||
"@angular/compiler": "^19.0.5", | ||
"@angular/core": "^19.0.5", | ||
"@angular/forms": "^19.0.5", | ||
"@angular/platform-browser": "^19.0.5", | ||
"@angular/platform-browser-dynamic": "^19.0.5", | ||
"@angular/router": "^19.0.5", | ||
"@angular/service-worker": "^19.0.5", | ||
"date-fns": "4.1.0", | ||
"dexie": "^4.0.9", | ||
"excalibur": "0.30.2", | ||
"pocketbase": "0.22.1", | ||
"rxjs": "~7.8.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "~0.15.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^19.0.5", | ||
"@angular/cli": "^19.0.5", | ||
"@angular/compiler-cli": "^19.0.5", | ||
"@biomejs/biome": "1.9.4", | ||
"@types/jasmine": "~5.1.0", | ||
"@types/node": "22.10.2", | ||
"jasmine-core": "~5.1.0", | ||
"karma": "~6.4.0", | ||
"karma-chrome-launcher": "~3.2.0", | ||
"karma-coverage": "~2.2.0", | ||
"karma-jasmine": "~5.1.0", | ||
"karma-jasmine-html-reporter": "~2.1.0", | ||
"typescript": "~5.6.3", | ||
"vite": "^5.0.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { type ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; | ||
import { type ApplicationConfig, provideZoneChangeDetection, isDevMode } from '@angular/core'; | ||
import { provideRouter, withHashLocation } from '@angular/router'; | ||
|
||
import { routes } from './app.routes'; | ||
import { provideServiceWorker } from '@angular/service-worker'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes, withHashLocation())] | ||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes, withHashLocation()), provideServiceWorker('ngsw-worker.js', { | ||
enabled: !isDevMode(), | ||
registrationStrategy: 'registerWhenStable:30000' | ||
})] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters