Skip to content

Instantly share code, notes, and snippets.

View webmaxru's full-sized avatar
😀
Progressive Web Max

Maxim Salnikov webmaxru

😀
Progressive Web Max
View GitHub Profile

Keybase proof

I hereby claim:

  • I am webmaxru on github.
  • I am salnikov (https://keybase.io/salnikov) on keybase.
  • I have a public key whose fingerprint is 5E98 E250 933E EC15 6DDF 9A47 CF7D 8C92 1A96 7D51

To claim this, I am signing this object:

importScripts('workbox-sw.prod.v2.0.0.js');
const fileManifest = [
{
"url": "index.html",
"revision": "a2153190bf7f353370efd3f79df6fd9a"
}
...
];
platformBrowserDynamic()
.bootstrapModule(AppModule)
.then(() => {
registerServiceWorker('sw-default')
});
function registerServiceWorker(swName: string) {
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register(`/${swName}.js`)
module.exports = {
"globDirectory": "dist/",
"globPatterns": [
"**/*.{txt,png,ico,html,js,json,css}"
],
"swDest": "dist/sw-default.js",
"globIgnores": [
"../workbox-cli-config.js",
"3rdpartylicenses.txt"
]
@webmaxru
webmaxru / app.module.ts
Last active October 1, 2017 21:00
ngsw - registration - app.module.ts
...
import { ServiceWorkerModule } from '@angular/service-worker'
@NgModule({
imports: [
...
ServiceWorkerModule.register('/ngsw-worker.js')
]
...
@webmaxru
webmaxru / ngsw-config.json
Last active October 2, 2017 14:24
ngsw - configuration file
{
"index": "/index.html",
"appData": {
"test": true
},
"assetGroups": [{
"name": "appshell",
"resources": {
"files": [
"/assets/**/*",
@webmaxru
webmaxru / in.d.ts
Created October 2, 2017 10:30
ngsw - configuration interface
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @experimental
*/
@webmaxru
webmaxru / ngsw-config.json
Created October 2, 2017 14:13
ngsw - configuration file
{
"index": "/index.html",
"appData": {
"test": true
},
"assetGroups": [{
"name": "appshell",
"resources": {
"files": [
"/assets/**/*",
@webmaxru
webmaxru / ngsw.json
Created October 2, 2017 14:24
ngsw - control file
{
"configVersion": 1,
"index": "/index.html",
"appData": {
"test": true
},
"assetGroups": [
{
"name": "appshell",
"installMode": "prefetch",
@webmaxru
webmaxru / ngsw-config.json
Created October 26, 2017 14:58
Default ngsw-config.json generated by Angular CLI
{
"index": "/index.html",
"assetGroups": [{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html"
],