Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 26dfd56

Browse files
authored
Merge pull request #5 from btroncone/pwa-setup
Added PWA capability and updated styling
2 parents 5f4f4a6 + 2685e5e commit 26dfd56

32 files changed

+202
-54
lines changed

.angular-cli.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"outDir": "dist",
1010
"assets": [
1111
"assets",
12+
"manifest.json",
1213
"favicon.ico"
1314
],
1415
"index": "index.html",
@@ -18,8 +19,9 @@
1819
"tsconfig": "tsconfig.app.json",
1920
"testTsconfig": "tsconfig.spec.json",
2021
"prefix": "app",
22+
"serviceWorker": true,
2123
"styles": [
22-
"styles.css"
24+
"styles.scss"
2325
],
2426
"scripts": [],
2527
"environmentSource": "environments/environment.ts",
@@ -54,7 +56,8 @@
5456
}
5557
},
5658
"defaults": {
57-
"styleExt": "css",
58-
"component": {}
59+
"styleExt": "scss",
60+
"component": {
61+
}
5962
}
6063
}

ngsw-manifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"external": {
3+
"urls": [
4+
{"url": "https://fonts.googleapis.com/icon?family=Material+Icons"},
5+
{"url": "https://fonts.googleapis.com/css?family=Roboto"},
6+
{"url": "https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"},
7+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"}
8+
]
9+
}
10+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"ng": "ng",
77
"start": "ng serve",
88
"build": "ng build",
9+
"build-prod": "ng build --prod",
910
"test": "ng test",
1011
"lint": "ng lint",
1112
"e2e": "ng e2e"
@@ -33,10 +34,13 @@
3334
"@angular/cli": "1.4.3",
3435
"@angular/compiler-cli": "^4.2.4",
3536
"@angular/language-service": "^4.2.4",
37+
"@angular/service-worker": "^1.0.0-beta.16",
3638
"@types/jasmine": "~2.5.53",
3739
"@types/jasminewd2": "~2.0.2",
3840
"@types/node": "~6.0.60",
41+
"angular2-template-loader": "^0.6.2",
3942
"codelyzer": "~3.1.1",
43+
"electron": "^1.6.11",
4044
"jasmine-core": "~2.6.2",
4145
"jasmine-spec-reporter": "~4.1.0",
4246
"karma": "~1.7.0",
@@ -48,6 +52,7 @@
4852
"protractor": "~5.1.2",
4953
"ts-node": "~3.2.0",
5054
"tslint": "~5.3.2",
51-
"typescript": "~2.3.3"
55+
"typescript": "~2.3.3",
56+
"wallaby-webpack": "*"
5257
}
5358
}

src/app/app.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<md-sidenav-container fullscreen>
2-
<md-toolbar color="accent">
3-
<button md-button (click)="sidenav.toggle()">
2+
<md-toolbar color="accent" class="mat-elevation-z6">
3+
<button md-icon-button (click)="sidenav.toggle()">
44
<md-icon>
55
menu
66
</md-icon>
77
</button>
8-
RxJS Docs
8+
<span class="title"> RxJS Docs </span>
99
</md-toolbar>
1010
<md-sidenav #sidenav>
1111
<md-toolbar>
1212
<span>
13-
<button md-button routerLink="/rxjs">
13+
<button md-button routerLink="/">
1414
Home
1515
</button>
1616
</span>
@@ -32,6 +32,6 @@
3232
</md-toolbar>
3333
</md-sidenav>
3434
<div class="body-margin">
35-
<router-outlet></router-outlet>
35+
<router-outlet></router-outlet>
3636
</div>
37-
</md-sidenav-container>
37+
</md-sidenav-container>

src/app/app.component.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.title {
2+
padding: 0 16px;
3+
}

src/app/app.component.spec.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component } from '@angular/core';
33
@Component({
44
selector: 'app-root',
55
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.css']
6+
styleUrls: ['./app.component.scss']
77
})
88
export class AppComponent {
99
title = 'app';

src/app/app.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
44
import { MdToolbarModule, MdSidenavModule, MdIconModule, MdButtonModule } from '@angular/material';
5-
import { routing } from './app.routing';
5+
import { RouterModule } from '@angular/router';
6+
7+
import { RXJS_DOC_ROUTES } from './app.routing';
68

79
import { AppComponent } from './app.component';
810
import { OperatorsComponent } from './operators/operators.component';
@@ -21,7 +23,7 @@ import { RxjsComponent } from './rxjs/rxjs.component';
2123
imports: [
2224
BrowserModule,
2325
BrowserAnimationsModule,
24-
routing,
26+
RouterModule.forRoot(RXJS_DOC_ROUTES),
2527
MdToolbarModule,
2628
MdSidenavModule,
2729
MdIconModule,

src/app/app.routing.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import { ModuleWithProviders } from '@angular/core';
2-
import { Routes, RouterModule } from '@angular/router';
2+
import { Routes } from '@angular/router';
33

44
import { CompaniesComponent } from './companies/companies.component';
55
import { OperatorsComponent } from './operators/operators.component';
66
import { RxjsComponent } from './rxjs/rxjs.component';
77
import { TeamComponent } from './team/team.component';
88

9-
const appRoutes: Routes = [
9+
export const RXJS_DOC_ROUTES: Routes = [
1010
{ path: '', component: RxjsComponent },
11-
{ path: 'rxjs', component: RxjsComponent},
1211
{ path: 'operators', component: OperatorsComponent },
1312
{ path: 'team', component: TeamComponent },
14-
{ path: 'companies', component: CompaniesComponent }
13+
{ path: 'companies', component: CompaniesComponent },
14+
{ path: '**', redirectTo: '' }
1515
];
16-
17-
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
File renamed without changes.

0 commit comments

Comments
 (0)