diff --git a/ngsw-manifest.json b/ngsw-manifest.json deleted file mode 100644 index 3c54627e..00000000 --- a/ngsw-manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "external": { - "urls": [ - {"url": "https://fonts.googleapis.com/icon?family=Material+Icons"}, - {"url": "https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"}, - {"url": "https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"}, - {"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"}, - {"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css"}, - {"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"}, - {"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/typescript.min.js"}, - {"url": "http://reactivex.io/rxjs/img/combineAll.png"}, - {"url": "http://reactivex.io/rxjs/img/combineLatest.png"} - ] - } -} diff --git a/package.json b/package.json index 40fd87e5..5225b37a 100644 --- a/package.json +++ b/package.json @@ -27,36 +27,37 @@ }, "private": true, "dependencies": { - "@angular/animations": "5.0.2", - "@angular/cdk": "5.0.0-rc0", - "@angular/common": "5.0.2", - "@angular/compiler": "5.0.2", - "@angular/core": "5.0.2", - "@angular/flex-layout": "2.0.0-beta.10", - "@angular/forms": "5.0.2", - "@angular/http": "5.0.2", - "@angular/material": "5.0.0-rc0", - "@angular/platform-browser": "5.0.2", - "@angular/platform-browser-dynamic": "5.0.2", - "@angular/router": "5.0.2", + "@angular/animations": "5.1.1", + "@angular/cdk": "5.0.1", + "@angular/common": "5.1.1", + "@angular/compiler": "5.1.1", + "@angular/core": "5.1.1", + "@angular/flex-layout": "2.0.0-beta.10-4905443", + "@angular/forms": "5.1.1", + "@angular/http": "5.1.1", + "@angular/material": "5.0.1", + "@angular/platform-browser": "5.1.1", + "@angular/platform-browser-dynamic": "5.1.1", + "@angular/router": "5.1.1", + "@angular/service-worker": "5.1.1", "@types/hammerjs": "2.0.35", "core-js": "2.4.1", "hammerjs": "2.0.8", - "rxjs": "5.5.2", + "rxjs": "5.5.5", "ts-loader": "3.1.1", "zone.js": "0.8.14" }, "devDependencies": { - "@angular/cli": "1.5.2", - "@angular/compiler-cli": "5.0.2", - "@angular/language-service": "5.0.2", - "@angular/service-worker": "1.0.0-beta.16", + "@angular/cli": "1.6.0", + "@angular/compiler-cli": "5.1.1", + "@angular/language-service": "5.1.1", + "@angular/service-worker": "5.1.1", "@types/jasmine": "2.5.53", "@types/jasminewd2": "2.0.2", "@types/lodash": "4.14.77", "@types/node": "6.0.60", "angular2-template-loader": "0.6.2", - "codelyzer": "3.1.1", + "codelyzer": "4.0.2", "commitizen": "^2.9.6", "cz-conventional-changelog": "^2.0.0", "danger": "1.2.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0018c3ae..65cc8442 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,9 +1,11 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { ServiceWorkerModule } from '@angular/service-worker'; import { MatSidenavModule, MatListModule } from '@angular/material'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FlexLayoutModule } from '@angular/flex-layout'; +import { environment } from '../environments/environment'; import { CoreModule } from '../app/core/core.module'; import { MaterialModule } from './material/material.module'; import { AppRoutingModule } from './app-routing.module'; @@ -14,6 +16,9 @@ import { AppComponent } from './app.component'; declarations: [AppComponent], imports: [ BrowserModule, + ServiceWorkerModule.register('/ngsw-worker.js', { + enabled: environment.production + }), BrowserAnimationsModule, FlexLayoutModule, MaterialModule, diff --git a/src/ngsw-config.json b/src/ngsw-config.json new file mode 100644 index 00000000..69739b59 --- /dev/null +++ b/src/ngsw-config.json @@ -0,0 +1,43 @@ +{ + "index": "/index.html", + "appData": { + "name": "RxJS Docs", + "description": "RxJS Docs" + }, + "assetGroups": [ + { + "name": "app", + "installMode": "prefetch", + "resources": { + "files": ["/favicon.ico", "/index.html"], + "versionedFiles": ["/*.bundle.css", "/*.bundle.js", "/*.chunk.js"] + } + }, + { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "files": ["/assets/**"] + } + }, + { + "name": "fonts", + "resources": { + "urls": ["https://fonts.googleapis.com/**"] + } + }, + { + "name": "misc", + "resources": { + "urls": [ + "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css", + "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/typescript.min.js", + "http://reactivex.io/rxjs/img/**" + ] + } + } + ] +}