Skip to content

Commit 9d5b237

Browse files
committed
feat: upgrade to angular v9
1 parent 699cbc9 commit 9d5b237

26 files changed

+13999
-10883
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]
@@ -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

angular.json

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"angular-web-bluetooth-starter": {
7-
"root": "",
8-
"sourceRoot": "src",
97
"projectType": "application",
10-
"prefix": "ble",
118
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
1212
"architect": {
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
@@ -17,7 +17,8 @@
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
1919
"polyfills": "src/polyfills.ts",
20-
"tsConfig": "src/tsconfig.app.json",
20+
"tsConfig": "tsconfig.app.json",
21+
"aot": true,
2122
"assets": [
2223
"src/favicon.ico",
2324
"src/assets"
@@ -43,7 +44,6 @@
4344
"sourceMap": false,
4445
"extractCss": true,
4546
"namedChunks": false,
46-
"aot": true,
4747
"extractLicenses": true,
4848
"vendorChunk": false,
4949
"buildOptimizer": true,
@@ -52,6 +52,11 @@
5252
"type": "initial",
5353
"maximumWarning": "2mb",
5454
"maximumError": "5mb"
55+
},
56+
{
57+
"type": "anyComponentStyle",
58+
"maximumWarning": "6kb",
59+
"maximumError": "10kb"
5560
}
5661
]
5762
}
@@ -79,38 +84,32 @@
7984
"options": {
8085
"main": "src/test.ts",
8186
"polyfills": "src/polyfills.ts",
82-
"tsConfig": "src/tsconfig.spec.json",
83-
"karmaConfig": "src/karma.conf.js",
87+
"tsConfig": "tsconfig.spec.json",
88+
"karmaConfig": "karma.conf.js",
89+
"assets": [
90+
"src/favicon.ico",
91+
"src/assets"
92+
],
8493
"styles": [
8594
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
8695
"src/styles.css"
8796
],
88-
"scripts": [],
89-
"assets": [
90-
"src/favicon.ico",
91-
"src/assets"
92-
]
97+
"scripts": []
9398
}
9499
},
95100
"lint": {
96101
"builder": "@angular-devkit/build-angular:tslint",
97102
"options": {
98103
"tsConfig": [
99-
"src/tsconfig.app.json",
100-
"src/tsconfig.spec.json"
104+
"tsconfig.app.json",
105+
"tsconfig.spec.json",
106+
"e2e/tsconfig.json"
101107
],
102108
"exclude": [
103109
"**/node_modules/**"
104110
]
105111
}
106-
}
107-
}
108-
},
109-
"angular-web-bluetooth-starter-e2e": {
110-
"root": "e2e/",
111-
"projectType": "application",
112-
"prefix": "",
113-
"architect": {
112+
},
114113
"e2e": {
115114
"builder": "@angular-devkit/build-angular:protractor",
116115
"options": {
@@ -122,29 +121,25 @@
122121
"devServerTarget": "angular-web-bluetooth-starter:serve:production"
123122
}
124123
}
125-
},
126-
"lint": {
127-
"builder": "@angular-devkit/build-angular:tslint",
128-
"options": {
129-
"tsConfig": "e2e/tsconfig.e2e.json",
130-
"exclude": [
131-
"**/node_modules/**"
132-
]
133-
}
134124
}
135125
}
136126
},
137127
"@manekinekko/angular-web-bluetooth": {
128+
"projectType": "library",
138129
"root": "projects/manekinekko/angular-web-bluetooth",
139130
"sourceRoot": "projects/manekinekko/angular-web-bluetooth/src",
140-
"projectType": "library",
141131
"prefix": "lib",
142132
"architect": {
143133
"build": {
144134
"builder": "@angular-devkit/build-ng-packagr:build",
145135
"options": {
146136
"tsConfig": "projects/manekinekko/angular-web-bluetooth/tsconfig.lib.json",
147137
"project": "projects/manekinekko/angular-web-bluetooth/ng-package.json"
138+
},
139+
"configurations": {
140+
"production": {
141+
"tsConfig": "projects/manekinekko/angular-web-bluetooth/tsconfig.lib.prod.json"
142+
}
148143
}
149144
},
150145
"test": {
@@ -170,5 +165,8 @@
170165
}
171166
}
172167
},
173-
"defaultProject": "angular-web-bluetooth-starter"
168+
"defaultProject": "angular-web-bluetooth-starter",
169+
"cli": {
170+
"analytics": "6c503e91-213a-464d-801c-5af37e13087c"
171+
}
174172
}

browserslist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

src/karma.conf.js renamed to karma.conf.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function (config) {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, '../coverage'),
19+
dir: require('path').join(__dirname, './coverage/angular-web-bluetooth-starter'),
2020
reports: ['html', 'lcovonly', 'text-summary'],
2121
fixWebpackSourcePaths: true
2222
},
@@ -26,6 +26,7 @@ module.exports = function (config) {
2626
logLevel: config.LOG_INFO,
2727
autoWatch: true,
2828
browsers: ['Chrome'],
29-
singleRun: false
29+
singleRun: false,
30+
restartOnFileChange: true
3031
});
31-
};
32+
};

0 commit comments

Comments
 (0)