Skip to content

Commit 9226c31

Browse files
committed
upgrade: v12
1 parent ebc7b2b commit 9226c31

10 files changed

Lines changed: 11342 additions & 11037 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<p align="center">
22

3-
<a href="https://slackin-pbfjhfxnsa.now.sh"><img src="https://slackin-pbfjhfxnsa.now.sh/badge.svg"></a>
4-
53
<a href="https://circleci.com/gh/codediodeio/angular-firestarter"><img src="https://circleci.com/gh/codediodeio/angular-firestarter.svg?style=svg"></a>
64

75
</p>
@@ -18,7 +16,7 @@ Firestarter is an Angular PWA powered by Firebase.
1816

1917
## Features
2018

21-
- Angular 9.x + Firebase
19+
- Angular 12.x + Firebase
2220
- Installable PWA
2321
- OAuth and Email/Password Signup with Firebase
2422
- Drag & drop Kanban demo with Firestore

package-lock.json

Lines changed: 11296 additions & 10988 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,56 @@
1111
"serve": "node serve-script",
1212
"build:prerender": "npm run build:client-and-server-bundles && node prerender.js",
1313
"serve:prerender": "http-server dist/browser -c-1",
14-
"compile:server_bak": "webpack --config webpack.server.config.js --progress --colors",
15-
"build:ssr_bak": "npm run build:client-and-server-bundles && npm run compile:server",
16-
"serve:ssr_bak": "node dist/server",
17-
"build:client-and-server-bundles_bak": "ng build --prod && ng run firestarter:server:production",
14+
"compile:server": "webpack --config webpack.server.config.js --progress --colors",
15+
"build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
16+
"serve:ssr": "node dist/server",
17+
"build:client-and-server-bundles": "ng build && ng run firestarter:server:production",
1818
"dev:ssr": "ng run firestarter:serve-ssr",
19-
"serve:ssr": "node dist/server/main.js",
20-
"build:ssr": "ng build --prod && ng run firestarter:server:production",
2119
"prerender": "ng run firestarter:prerender"
2220
},
2321
"private": true,
2422
"dependencies": {
25-
"@angular/animations": "~9.0.1",
26-
"@angular/cdk": "~9.0.0",
27-
"@angular/common": "~9.0.1",
28-
"@angular/compiler": "~9.0.1",
29-
"@angular/core": "~9.0.1",
30-
"@angular/fire": "^5.4.2",
31-
"@angular/forms": "~9.0.1",
32-
"@angular/material": "^9.0.0",
33-
"@angular/platform-browser": "~9.0.1",
34-
"@angular/platform-browser-dynamic": "~9.0.1",
35-
"@angular/platform-server": "~9.0.1",
36-
"@angular/router": "~9.0.1",
37-
"@angular/service-worker": "~9.0.1",
23+
"@angular/animations": "~12.0.1",
24+
"@angular/cdk": "~12.0.1",
25+
"@angular/common": "~12.0.1",
26+
"@angular/compiler": "~12.0.1",
27+
"@angular/core": "~12.0.1",
28+
"@angular/fire": "^6.1.5",
29+
"@angular/forms": "~12.0.1",
30+
"@angular/material": "^12.0.1",
31+
"@angular/platform-browser": "~12.0.1",
32+
"@angular/platform-browser-dynamic": "~12.0.1",
33+
"@angular/platform-server": "~12.0.1",
34+
"@angular/router": "~12.0.1",
35+
"@angular/service-worker": "~12.0.1",
3836
"@nestjs/common": "^6.11.6",
3937
"@nestjs/core": "^6.11.6",
4038
"@nestjs/ng-universal": "^3.0.0",
4139
"@nestjs/platform-express": "^6.11.6",
42-
"@nguniversal/express-engine": "^9.0.0",
40+
"@nguniversal/express-engine": "^12.0.0",
4341
"express": "^4.15.2",
44-
"firebase": "7.8.1",
42+
"firebase": "^8.6.2",
4543
"reflect-metadata": "^0.1.13",
4644
"rxjs": "~6.5.4",
4745
"tslib": "^1.10.0",
48-
"zone.js": "~0.10.2"
46+
"zone.js": "^0.11.4"
4947
},
5048
"devDependencies": {
51-
"@angular-devkit/build-angular": "~0.900.2",
52-
"@angular/cli": "~9.0.2",
53-
"@angular/compiler-cli": "~9.0.1",
54-
"@angular/language-service": "~9.0.1",
55-
"@nguniversal/builders": "^9.0.0",
49+
"@angular-devkit/architect": "0.1200.1",
50+
"@angular-devkit/build-angular": "~12.0.1",
51+
"@angular/cli": "~12.0.1",
52+
"@angular/compiler-cli": "~12.0.1",
53+
"@angular/language-service": "~12.0.1",
54+
"@nguniversal/builders": "^12.0.0",
5655
"@types/express": "^4.17.0",
57-
"@types/node": "^12.11.1",
5856
"@types/jasmine": "~3.5.3",
5957
"@types/jasminewd2": "~2.0.8",
60-
"codelyzer": "^5.1.2",
58+
"@types/node": "^12.11.1",
59+
"codelyzer": "^6.0.2",
60+
"firebase-tools": "^7.13.0",
61+
"fuzzy": "^0.1.3",
62+
"inquirer": "^7.0.4",
63+
"inquirer-autocomplete-prompt": "^1.0.2",
6164
"jasmine-core": "~3.5.0",
6265
"jasmine-spec-reporter": "~4.2.1",
6366
"karma": "~4.4.1",
@@ -71,12 +74,7 @@
7174
"ts-loader": "^6.2.1",
7275
"ts-node": "~8.6.2",
7376
"tslint": "~6.0.0",
74-
"typescript": "~3.7.5",
75-
"@angular-devkit/architect": "0.900.2",
76-
"firebase-tools": "^7.13.0",
77-
"fuzzy": "^0.1.3",
78-
"inquirer": "^7.0.4",
79-
"inquirer-autocomplete-prompt": "^1.0.2",
77+
"typescript": "^4.2.3",
8078
"wait-on": "^4.0.0",
8179
"webpack-cli": "^3.3.11"
8280
}

server/app.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import { join } from 'path';
66
imports: [
77
AngularUniversalModule.forRoot({
88
viewsPath: join(process.cwd(), 'dist/browser'),
9-
bundle: require('../server/main'),
10-
liveReload: true
9+
bootstrap: ApplicationModule
10+
// bundle: require('../server/main'),
11+
// liveReload: true
1112
})
1213
]
1314
})

src/app/kanban/board.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { AngularFireAuth } from '@angular/fire/auth';
33
import { AngularFirestore } from '@angular/fire/firestore';
4-
import * as firebase from 'firebase/app';
4+
import firebase from 'firebase/app';
55
import { switchMap, map } from 'rxjs/operators';
66
import { Board, Task } from './board.model';
77

@@ -15,7 +15,7 @@ export class BoardService {
1515
* Creates a new board for the current user
1616
*/
1717
async createBoard(data: Board) {
18-
const user = await this.afAuth.auth.currentUser;
18+
const user = await this.afAuth.currentUser;
1919
return this.db.collection('boards').add({
2020
...data,
2121
uid: user.uid,

src/app/user/auth.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class AuthGuard implements CanActivate {
1919
next: ActivatedRouteSnapshot,
2020
state: RouterStateSnapshot
2121
): Promise<boolean> {
22-
const user = await this.afAuth.auth.currentUser;
22+
const user = await this.afAuth.currentUser;
2323
const isLoggedIn = !!user;
2424
if (!isLoggedIn) {
2525
this.snack.authError();

src/app/user/email-login/email-login.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ export class EmailLoginComponent implements OnInit {
7575

7676
try {
7777
if (this.isLogin) {
78-
await this.afAuth.auth.signInWithEmailAndPassword(email, password);
78+
await this.afAuth.signInWithEmailAndPassword(email, password);
7979
}
8080
if (this.isSignup) {
81-
await this.afAuth.auth.createUserWithEmailAndPassword(email, password);
81+
await this.afAuth.createUserWithEmailAndPassword(email, password);
8282
}
8383
if (this.isPasswordReset) {
84-
await this.afAuth.auth.sendPasswordResetEmail(email);
84+
await this.afAuth.sendPasswordResetEmail(email);
8585
this.serverMessage = 'Check your email';
8686
}
8787
} catch (err) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Directive, HostListener } from '@angular/core';
22
import { AngularFireAuth } from '@angular/fire/auth';
3-
import * as firebase from 'firebase/app';
3+
import firebase from 'firebase/app';
44

55
@Directive({
66
selector: '[appGoogleSignin]'
@@ -10,6 +10,6 @@ export class GoogleSigninDirective {
1010

1111
@HostListener('click')
1212
onclick() {
13-
this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
13+
this.afAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
1414
}
1515
}

src/app/user/login-page/login-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ <h5>OR</h5>
1616
Logged in as <strong>{{ user.email }}</strong>
1717
</p>
1818

19-
<button mat-stroked-button (click)="afAuth.auth.signOut()">Logout</button>
19+
<button mat-stroked-button (click)="afAuth.signOut()">Logout</button>
2020
</div>
2121
</main>

0 commit comments

Comments
 (0)