Skip to content

Commit d1bfab4

Browse files
committed
Update project to angular 13
1 parent 3e72134 commit d1bfab4

17 files changed

+14066
-19126
lines changed

browserslist renamed to .browserslistrc

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
1016
Firefox ESR
11-
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

.gitignore

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,42 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
# Only exists if Bazel was run
87
/bazel-out
98

10-
# dependencies
9+
# Node
1110
/node_modules
12-
13-
# profiling files
14-
chrome-profiler-events.json
15-
speed-measure-plugin.json
11+
npm-debug.log
12+
yarn-error.log
1613

1714
# IDEs and editors
18-
/.idea
15+
.idea/
1916
.project
2017
.classpath
2118
.c9/
2219
*.launch
2320
.settings/
2421
*.sublime-workspace
2522

26-
# IDE - VSCode
23+
# Visual Studio Code
2724
.vscode/*
2825
!.vscode/settings.json
2926
!.vscode/tasks.json
3027
!.vscode/launch.json
3128
!.vscode/extensions.json
3229
.history/*
3330

34-
# misc
35-
/.sass-cache
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
3634
/connect.lock
3735
/coverage
3836
/libpeerconnection.log
39-
npm-debug.log
40-
yarn-error.log
4137
testem.log
4238
/typings
4339

44-
# System Files
40+
# System files
4541
.DS_Store
4642
Thumbs.db

angular.json

+43-51
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"schematics": {
99
"@schematics/angular:component": {
1010
"style": "scss"
11+
},
12+
"@schematics/angular:application": {
13+
"strict": true
1114
}
1215
},
1316
"root": "",
@@ -22,49 +25,55 @@
2225
"main": "src/main.ts",
2326
"polyfills": "src/polyfills.ts",
2427
"tsConfig": "tsconfig.app.json",
25-
"aot": false,
26-
"assets": [
27-
"src/favicon.ico",
28-
"src/assets"
29-
],
30-
"styles": [
31-
"src/styles.scss"
32-
],
28+
"inlineStyleLanguage": "scss",
29+
"assets": ["src/favicon.ico", "src/assets"],
30+
"styles": ["src/styles.scss"],
3331
"scripts": []
3432
},
3533
"configurations": {
3634
"production": {
37-
"fileReplacements": [{
38-
"replace": "src/environments/environment.ts",
39-
"with": "src/environments/environment.prod.ts"
40-
}],
41-
"optimization": true,
42-
"outputHashing": "all",
43-
"sourceMap": false,
44-
"extractCss": true,
45-
"namedChunks": false,
46-
"aot": true,
47-
"extractLicenses": true,
48-
"vendorChunk": false,
49-
"buildOptimizer": true,
50-
"budgets": [{
51-
"type": "initial",
52-
"maximumWarning": "2mb",
53-
"maximumError": "5mb"
54-
}]
35+
"budgets": [
36+
{
37+
"type": "initial",
38+
"maximumWarning": "500kb",
39+
"maximumError": "1mb"
40+
},
41+
{
42+
"type": "anyComponentStyle",
43+
"maximumWarning": "2kb",
44+
"maximumError": "4kb"
45+
}
46+
],
47+
"fileReplacements": [
48+
{
49+
"replace": "src/environments/environment.ts",
50+
"with": "src/environments/environment.prod.ts"
51+
}
52+
],
53+
"outputHashing": "all"
54+
},
55+
"development": {
56+
"buildOptimizer": false,
57+
"optimization": false,
58+
"vendorChunk": true,
59+
"extractLicenses": false,
60+
"sourceMap": true,
61+
"namedChunks": true
5562
}
56-
}
63+
},
64+
"defaultConfiguration": "production"
5765
},
5866
"serve": {
5967
"builder": "@angular-devkit/build-angular:dev-server",
60-
"options": {
61-
"browserTarget": "ngx-online-status:build"
62-
},
6368
"configurations": {
6469
"production": {
6570
"browserTarget": "ngx-online-status:build:production"
71+
},
72+
"development": {
73+
"browserTarget": "ngx-online-status:build:development"
6674
}
67-
}
75+
},
76+
"defaultConfiguration": "development"
6877
},
6978
"extract-i18n": {
7079
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -79,29 +88,12 @@
7988
"polyfills": "src/polyfills.ts",
8089
"tsConfig": "tsconfig.spec.json",
8190
"karmaConfig": "karma.conf.js",
82-
"assets": [
83-
"src/favicon.ico",
84-
"src/assets"
85-
],
86-
"styles": [
87-
"src/styles.scss"
88-
],
91+
"inlineStyleLanguage": "scss",
92+
"assets": ["src/favicon.ico", "src/assets"],
93+
"styles": ["src/styles.scss"],
8994
"scripts": []
9095
}
9196
},
92-
"lint": {
93-
"builder": "@angular-devkit/build-angular:tslint",
94-
"options": {
95-
"tsConfig": [
96-
"tsconfig.app.json",
97-
"tsconfig.spec.json",
98-
"e2e/tsconfig.json"
99-
],
100-
"exclude": [
101-
"**/node_modules/**"
102-
]
103-
}
104-
},
10597
"e2e": {
10698
"builder": "@angular-devkit/build-angular:protractor",
10799
"options": {

karma.conf.js

+26-17
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,45 @@
33

44
module.exports = function (config) {
55
config.set({
6-
basePath: '',
7-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
6+
basePath: "",
7+
frameworks: ["jasmine", "@angular-devkit/build-angular"],
88
plugins: [
9-
require('karma-jasmine'),
10-
require('karma-chrome-launcher'),
11-
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
9+
require("karma-jasmine"),
10+
require("karma-chrome-launcher"),
11+
require("karma-jasmine-html-reporter"),
12+
require("karma-coverage"),
13+
require("@angular-devkit/build-angular/plugins/karma"),
1414
],
1515
client: {
16-
clearContext: false // leave Jasmine Spec Runner output visible in browser
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, './coverage/ngx-online-status'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
24+
jasmineHtmlReporter: {
25+
suppressAll: true, // removes the duplicated traces
2226
},
23-
reporters: ['progress', 'kjhtml'],
27+
coverageReporter: {
28+
dir: require("path").join(__dirname, "./coverage/ngx-online-status"),
29+
subdir: ".",
30+
reporters: [{ type: "html" }, { type: "text-summary" }],
31+
},
32+
reporters: ["progress", "kjhtml"],
2433
port: 9876,
2534
colors: true,
2635
logLevel: config.LOG_INFO,
2736
autoWatch: true,
28-
browsers: ['Chrome'],
37+
browsers: ["Chrome"],
2938
singleRun: false,
3039
restartOnFileChange: true,
3140
customLaunchers: {
3241
ChromeHeadlessCustom: {
33-
base: 'ChromeHeadless',
34-
flags: ['--no-sandbox', '--disable-gpu']
35-
}
42+
base: "ChromeHeadless",
43+
flags: ["--no-sandbox", "--disable-gpu"],
44+
},
3645
},
3746
});
3847
};

0 commit comments

Comments
 (0)