Skip to content

Commit 0e77539

Browse files
committed
initial angular upgrade
1 parent 8613975 commit 0e77539

18 files changed

+2687
-2217
lines changed

package-lock.json

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

package.json

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularpwaseed",
3-
"version": "10.1.4",
3+
"version": "11.1.2",
44
"description": "A starter project for a PWA built in Angular",
55
"author": "swimmadude66",
66
"license": "MIT",
@@ -18,8 +18,6 @@
1818
"predev": "rimraf dist",
1919
"build": "gulp",
2020
"dev": "gulp watch",
21-
"predevssr": "rimraf dist",
22-
"devssr": "gulp watchssr",
2321
"clean": "rimraf dist",
2422
"karma": "karma",
2523
"test": "concurrently npm:test-client npm:test-server",
@@ -32,16 +30,13 @@
3230
"preanalyze-client": "rimraf dist/client reports/client",
3331
"analyze-client": "gulp analyze",
3432
"prebuild-server": "rimraf dist/server",
35-
"build-server": "gulp compile-node",
33+
"build-server": "gulp compileNode",
3634
"prebuild-client": "rimraf dist/client",
37-
"build-client": "gulp webpack",
38-
"prebuildssr": "rimraf dist",
39-
"buildssr": "gulp build-ssr"
35+
"build-client": "gulp webpack"
4036
},
4137
"dependencies": {
42-
"argon2": "0.27.0",
38+
"argon2": "0.27.1",
4339
"body-parser": "1.19.0",
44-
"classlist": "2.0.0",
4540
"compression": "1.7.4",
4641
"cookie-parser": "1.4.5",
4742
"dotenv": "8.2.0",
@@ -54,17 +49,18 @@
5449
"spdy": "4.0.2"
5550
},
5651
"devDependencies": {
57-
"@angular/animations": "10.1.4",
58-
"@angular/common": "10.1.4",
59-
"@angular/compiler": "10.1.4",
60-
"@angular/compiler-cli": "10.1.4",
61-
"@angular/core": "10.1.4",
62-
"@angular/forms": "10.1.4",
63-
"@angular/language-service": "10.1.4",
64-
"@angular/platform-browser": "10.1.4",
65-
"@angular/platform-browser-dynamic": "10.1.4",
66-
"@angular/router": "10.1.4",
67-
"@ngtools/webpack": "10.1.4",
52+
"@angular-devkit/build-optimizer": "0.1101.4",
53+
"@angular/animations": "11.1.2",
54+
"@angular/common": "11.1.2",
55+
"@angular/compiler": "11.1.2",
56+
"@angular/compiler-cli": "11.1.2",
57+
"@angular/core": "11.1.2",
58+
"@angular/forms": "11.1.2",
59+
"@angular/language-service": "11.1.2",
60+
"@angular/platform-browser": "11.1.2",
61+
"@angular/platform-browser-dynamic": "11.1.2",
62+
"@angular/router": "11.1.2",
63+
"@ngtools/webpack": "11.1.4",
6864
"@types/chai": "4.2.12",
6965
"@types/core-js": "2.5.4",
7066
"@types/mocha": "8.0.3",
@@ -77,6 +73,7 @@
7773
"browser-sync-webpack-plugin": "2.2.2",
7874
"chai": "4.2.0",
7975
"circular-dependency-plugin": "5.2.0",
76+
"classlist": "2.0.0",
8077
"concurrently": "5.3.0",
8178
"copy-webpack-plugin": "6.1.1",
8279
"core-js": "3.6.5",
@@ -86,10 +83,10 @@
8683
"file-loader": "6.1.0",
8784
"gulp": "4.0.2",
8885
"gulp-typescript": "5.0.1",
89-
"html-loader": "1.3.1",
90-
"html-webpack-link-type-plugin": "1.0.3",
91-
"html-webpack-plugin": "4.5.0",
92-
"html-webpack-skip-assets-plugin": "0.0.2",
86+
"html-loader": "1.3.2",
87+
"html-webpack-link-type-plugin": "1.1.0",
88+
"html-webpack-plugin": "3.2.0",
89+
"html-webpack-skip-assets-plugin": "1.0.0",
9390
"istanbul-instrumenter-loader": "3.0.1",
9491
"karma": "5.2.3",
9592
"karma-chrome-launcher": "3.1.0",
@@ -105,32 +102,32 @@
105102
"postcss": "8.1.1",
106103
"postcss-loader": "4.0.2",
107104
"reflect-metadata": "0.1.13",
108-
"resolve-url-loader": "3.1.1",
105+
"resolve-url-loader": "3.1.2",
109106
"rimraf": "3.0.2",
110107
"sass": "1.26.11",
111-
"sass-loader": "10.0.2",
112-
"source-map-loader": "1.1.0",
108+
"sass-loader": "10.0.4",
109+
"source-map-loader": "1.1.1",
113110
"supertest": "5.0.0",
114111
"terser-webpack-plugin": "4.2.2",
115112
"to-string-loader": "1.1.6",
116113
"ts-mockito": "2.6.1",
117114
"ts-node": "9.0.0",
118115
"tslib": "2.0.1",
119116
"typescript": "4.0.3",
120-
"url-loader": "4.1.0",
117+
"url-loader": "4.1.1",
121118
"webpack": "4.44.2",
122119
"webpack-bundle-analyzer": "3.9.0",
123120
"webpack-cli": "3.3.12",
124121
"webpack-node-externals": "2.5.2",
125-
"webpack-nomodule-plugin": "1.0.1",
122+
"webpack-nomodule-plugin": "1.1.0",
126123
"workbox-cacheable-response": "5.1.4",
127124
"workbox-core": "5.1.4",
128125
"workbox-expiration": "5.1.4",
129126
"workbox-precaching": "5.1.4",
130127
"workbox-routing": "5.1.4",
131128
"workbox-strategies": "5.1.4",
132129
"workbox-webpack-plugin": "5.1.4",
133-
"zone.js": "0.10.3"
130+
"zone.js": "0.11.3"
134131
},
135132
"nyc": {
136133
"reporter": [

src/client/components/app/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {Component, OnInit} from '@angular/core';
22
import {distinctUntilChanged} from 'rxjs/operators';
3-
import {Animations} from '@core/animations/index';
3+
import {Animations} from '@core/animations';
44
import {SubscriberComponent} from '@core/component/subscriber';
55
import {Toast} from '@models/shared/toast';
6-
import {ConnectionService, ToastService, WebviewService} from '@services/index';
6+
import {ConnectionService, ToastService, WebviewService} from '@services';
77

88
@Component({
99
selector: 'app',

src/client/components/inputgroup/component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import {Component, Output, ViewChild, ElementRef, forwardRef, EventEmitter, Input} from '@angular/core';
22
import {ControlValueAccessor, NG_VALUE_ACCESSOR, AbstractControl} from '@angular/forms';
3-
import {FormErrorParser} from '@core/index';
4-
import {MaskService} from '@services/index';
3+
import {FormErrorParser} from '@core';
4+
import {MaskService} from '@services';
55

66
export const INPUT_GROUP_VALUE_ACCESSOR : any = {
77
provide: NG_VALUE_ACCESSOR,
88
useExisting: forwardRef(() => InputGroupComponent),
99
multi: true
1010
};
11-
11+
1212
type MASK = 'CURRENCY' | 'DATE' | 'PHONE';
1313

1414
@Component({
@@ -51,7 +51,7 @@ export class InputGroupComponent implements ControlValueAccessor {
5151
}
5252

5353
private _maskType: MASK;
54-
54+
5555
pristine: boolean = true;
5656
blurred: boolean = false;
5757
focused: boolean = false;
@@ -69,8 +69,8 @@ export class InputGroupComponent implements ControlValueAccessor {
6969
|| err.passwordSymbols
7070
|| err.passwordComplexity);
7171
}
72-
73-
private _onChange: Function;
72+
73+
private _onChange: Function;
7474
private _onTouch: Function;
7575
private _lastLength: number = 0;
7676

@@ -111,7 +111,7 @@ export class InputGroupComponent implements ControlValueAccessor {
111111
this._lastLength = value.length;
112112
}
113113
this.emitValue(outputValue);
114-
114+
115115
}
116116

117117
onTouch(event) {

src/client/components/login/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {Component} from '@angular/core';
22
import {FormBuilder, FormGroup, Validators, FormControl} from '@angular/forms';
33
import {Router} from '@angular/router';
4-
import {SubscriberComponent} from '@core/index';
5-
import {AuthService} from '@services/index';
4+
import {SubscriberComponent} from '@core';
5+
import {AuthService} from '@services';
66

77
@Component({
88
selector: 'login',

src/client/components/signup/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {Component} from '@angular/core';
22
import {FormBuilder, FormGroup, Validators, FormControl} from '@angular/forms';
33
import {Router} from '@angular/router';
4-
import {SubscriberComponent, PasswordValidation, FormErrorParser} from '@core/index';
5-
import {AuthService} from '@services/index';
4+
import {SubscriberComponent, PasswordValidation, FormErrorParser} from '@core';
5+
import {AuthService} from '@services';
66

77
@Component({
88
selector: 'signup',

src/client/components/toast/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
22
import { timer } from 'rxjs';
33
import { takeWhile } from 'rxjs/operators';
4-
import { SubscriberComponent } from '@core/index';
4+
import { SubscriberComponent } from '@core';
55
import { Toast, ToastType } from '@models/shared/toast';
66

77
@Component({
@@ -17,7 +17,7 @@ export class ToastComponent extends SubscriberComponent implements OnInit {
1717
@Output('dismiss') dismiss: EventEmitter<boolean> = new EventEmitter<boolean>(); // boolean value to represent whether it was killed, or expired
1818

1919
private _expired: boolean = false;
20-
20+
2121
ngOnInit() {
2222
this.addSubscription(
2323
timer(0, 100)

src/client/guards/loggedin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {Injectable} from '@angular/core';
22
import {
3-
CanLoad,
4-
CanActivate,
5-
CanActivateChild,
6-
Router,
7-
Route,
8-
ActivatedRouteSnapshot,
3+
CanLoad,
4+
CanActivate,
5+
CanActivateChild,
6+
Router,
7+
Route,
8+
ActivatedRouteSnapshot,
99
RouterStateSnapshot
1010
} from '@angular/router';
1111
import {Observable} from 'rxjs';
1212
import {tap} from 'rxjs/operators';
13-
import {AuthService} from '@services/index';
13+
import {AuthService} from '@services';
1414

1515
@Injectable({
1616
providedIn: 'root'

src/client/guards/notloggedin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import {Injectable} from '@angular/core';
22
import {
3-
CanLoad,
4-
CanActivate,
5-
CanActivateChild,
6-
Router,
7-
Route,
8-
ActivatedRouteSnapshot,
3+
CanLoad,
4+
CanActivate,
5+
CanActivateChild,
6+
Router,
7+
Route,
8+
ActivatedRouteSnapshot,
99
RouterStateSnapshot
1010
} from '@angular/router';
1111
import {Observable} from 'rxjs';
1212
import {tap, map} from 'rxjs/operators';
13-
import {AuthService} from '@services/index';
13+
import {AuthService} from '@services';
1414

1515
@Injectable({
1616
providedIn: 'root'

src/client/modules/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-brows
44
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
55
import {SharedModule} from '@modules/shared';
66
import {AppComponent} from '@components/app/component';
7-
import {IsLoggedInGuard, NotLoggedInGuard} from '@guards/index'
7+
import {IsLoggedInGuard, NotLoggedInGuard} from '@guards'
88

99
@NgModule({
1010
bootstrap: [

src/client/modules/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {ReactiveFormsModule} from '@angular/forms';
55
import {HttpClientModule} from '@angular/common/http';
66
import {InputGroupComponent} from '@components/inputgroup/component';
77
import {ToastComponent} from '@components/toast/component';
8-
import {ShortenTextPipe, FloorNumberPipe} from '@pipes/index';
9-
import {AltTextDirective, ExternalLinkDirective} from '@directives/index';
8+
import {ShortenTextPipe, FloorNumberPipe} from '@pipes';
9+
import {AltTextDirective, ExternalLinkDirective} from '@directives';
1010

1111
@NgModule({
1212
imports:[

src/client/tests/pipes/floor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import {FloorNumberPipe} from '@pipes/index';
2+
import {FloorNumberPipe} from '@pipes';
33

44
describe('FloorNumberPipe', () => {
55

src/client/tests/pipes/shorten.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import {ShortenTextPipe} from '@pipes/index';
2+
import {ShortenTextPipe} from '@pipes';
33

44
describe('ShortenPipe', () => {
55

src/client/tests/services/mask.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import { MaskService } from '@services/index';
2+
import { MaskService } from '@services';
33

44
describe('MaskService', () => {
55
let maskService: MaskService;
@@ -70,7 +70,7 @@ describe('MaskService', () => {
7070
original = '1111111111111111111111111111111111';
7171
masked = maskService.maskPhone(original);
7272
expect(masked).to.equal('(111) 111 1111');
73-
73+
7474
});
7575
});
7676

@@ -175,7 +175,7 @@ describe('MaskService', () => {
175175

176176
original = '1111111111111111111111111111111111111';
177177
masked = maskService.maskDate(original);
178-
expect(masked).to.equal('11/11/1111');
178+
expect(masked).to.equal('11/11/1111');
179179
});
180180
});
181181

src/client/tests/services/toast.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {expect} from 'chai';
2-
import { ToastService } from '@services/index';
2+
import { ToastService } from '@services';
33
import { take, pairwise } from 'rxjs/operators';
4-
import { ToastType } from '@models/index';
4+
import { ToastType } from '@models';
55

66
describe('ToastService', () => {
77
let toastService: ToastService;

src/client/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
],
1919
"baseUrl": ".",
2020
"paths": {
21+
"@components": ["components"],
22+
"@directives": ["directives"],
23+
"@core": ["core"],
24+
"@guards": ["guards"],
25+
"@models": ["models"],
26+
"@modules": ["modules"],
27+
"@pipes": ["pipes"],
28+
"@services": ["services"],
29+
"@resolvers": ["resolvers"],
30+
"@mock_data": ["tests/mock_data"],
2131
"@components/*": ["components/*", "components/"],
2232
"@directives/*": ["directives/*", "directives/"],
2333
"@core/*": ["core/*", "core/"],

src/server/tsconfig.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
"target": "es6",
44
"module": "commonjs",
55
"moduleResolution": "node",
6-
"sourceMap": true,
6+
"importHelpers": true,
77
"emitDecoratorMetadata": true,
88
"experimentalDecorators": true,
99
"removeComments": true,
1010
"noImplicitAny": false,
11-
"outDir": "dist"
11+
"outDir": "../../dist/server/",
12+
"typeRoots": [
13+
"../../node_modules/@types/"
14+
]
1215
},
1316
"exclude": [
1417
"tests/",
15-
"**/*.spec"
18+
"**/*.spec",
19+
"../../node_modules/"
1620
]
1721
}

webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ const config = {
2828
pathinfo: process.env.BUILD_MODE === 'development',
2929
},
3030
resolve: {
31-
extensions: ['.ts', '.js', '.json', '.scss', '.css']
31+
extensions: ['.ts', '.js', '.json', '.scss', '.css'],
32+
mainFields: [ 'module' ],
33+
alias: {
34+
'/assets': path.join(__dirname, './src/client/assets')
35+
}
3236
},
3337
module: {
3438
rules: [

0 commit comments

Comments
 (0)