Skip to content

Commit 4653848

Browse files
committed
chore: update libraries
1 parent ab7c99a commit 4653848

13 files changed

+233
-216
lines changed

angular.json

+24-8
Original file line numberDiff line numberDiff line change
@@ -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"
@@ -40,10 +41,21 @@
4041
"sourceMap": false,
4142
"extractCss": true,
4243
"namedChunks": false,
43-
"aot": true,
4444
"extractLicenses": true,
4545
"vendorChunk": false,
46-
"buildOptimizer": true
46+
"buildOptimizer": true,
47+
"budgets": [
48+
{
49+
"type": "initial",
50+
"maximumWarning": "2mb",
51+
"maximumError": "5mb"
52+
},
53+
{
54+
"type": "anyComponentStyle",
55+
"maximumWarning": "6kb",
56+
"maximumError": "10kb"
57+
}
58+
]
4759
}
4860
}
4961
},
@@ -68,8 +80,8 @@
6880
"builder": "@angular-devkit/build-angular:tslint",
6981
"options": {
7082
"tsConfig": [
71-
"src/tsconfig.app.json",
72-
"src/tsconfig.spec.json"
83+
"tsconfig.app.json",
84+
"tsconfig.json"
7385
],
7486
"exclude": [
7587
"**/node_modules/**"
@@ -100,8 +112,7 @@
100112
"builder": "@angular-devkit/build-angular:tslint",
101113
"options": {
102114
"tsConfig": [
103-
"projects/slider/tsconfig.lib.json",
104-
"projects/slider/tsconfig.spec.json"
115+
"projects/slider/tsconfig.lib.json"
105116
],
106117
"exclude": [
107118
"**/node_modules/**"
@@ -111,5 +122,10 @@
111122
}
112123
}
113124
},
114-
"defaultProject": "slider-library"
125+
"defaultProject": "slider-library",
126+
"schematics": {
127+
"@schematics/angular:component": {
128+
"styleext": "scss"
129+
}
130+
}
115131
}

package-lock.json

+19-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"ng": "ng",
2323
"start": "ng serve",
2424
"build": "ng build",
25-
"test": "ng test",
26-
"lint": "ng lint",
27-
"e2e": "ng e2e"
25+
"lint": "ng lint"
2826
},
2927
"private": true,
3028
"dependencies": {
@@ -45,10 +43,11 @@
4543
"@angular/cli": "^10.1.4",
4644
"@angular/compiler-cli": "^10.1.4",
4745
"@angular/language-service": "^10.1.4",
46+
"@schematics/angular": "^10.1.4",
4847
"@types/node": "~8.9.4",
4948
"codelyzer": "^6.0.0",
5049
"ng-packagr": "^10.1.0",
51-
"ts-node": "~5.0.1",
50+
"ts-node": "^9.0.0",
5251
"tslib": "^2.0.0",
5352
"tslint": "~6.1.0",
5453
"typescript": "~4.0.3"

projects/slider/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"tslib": "^2.0.0"
1818
},
1919
"peerDependencies": {
20-
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
21-
"@angular/core": "^6.0.0-rc.0 || ^6.0.0"
20+
"@angular/common": "^10.0.0",
21+
"@angular/core": "^10.0.0"
2222
}
2323
}

projects/slider/src/test.ts

-22
This file was deleted.

src/.browserslistrc

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
4-
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5-
> 0.5%
6-
last 2 versions
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
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
716
Firefox ESR
8-
not dead
9-
# IE 9-11
17+
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
18+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
File renamed without changes.

src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { BulletType } from 'projects/slider/src/lib/models/bullet-type.enum';
77
@Component({
88
selector: 'app-root',
99
templateUrl: './app.component.html',
10-
styleUrls: ['./app.component.css']
10+
styleUrls: ['./app.component.scss']
1111
})
1212
export class AppComponent {
1313

src/polyfills.ts

+25-38
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/***************************************************************************************************
2+
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
3+
*/
4+
// import '@angular/localize/init';
15
/**
26
* This file includes polyfills needed by Angular and is loaded before the app.
37
* You can add your own extra polyfills to this file.
@@ -11,70 +15,53 @@
1115
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
1216
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
1317
*
14-
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
18+
* Learn more in https://angular.io/guide/browser-support
1519
*/
1620

1721
/***************************************************************************************************
1822
* BROWSER POLYFILLS
1923
*/
2024

21-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22-
// import 'core-js/es6/symbol';
23-
// import 'core-js/es6/object';
24-
// import 'core-js/es6/function';
25-
// import 'core-js/es6/parse-int';
26-
// import 'core-js/es6/parse-float';
27-
// import 'core-js/es6/number';
28-
// import 'core-js/es6/math';
29-
// import 'core-js/es6/string';
30-
// import 'core-js/es6/date';
31-
// import 'core-js/es6/array';
32-
// import 'core-js/es6/regexp';
33-
// import 'core-js/es6/map';
34-
// import 'core-js/es6/weak-map';
35-
// import 'core-js/es6/set';
36-
3725
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
3826
// import 'classlist.js'; // Run `npm install --save classlist.js`.
3927

40-
/** IE10 and IE11 requires the following for the Reflect API. */
41-
// import 'core-js/es6/reflect';
42-
43-
44-
/** Evergreen browsers require these. **/
45-
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46-
import 'core-js/es7/reflect';
47-
48-
4928
/**
5029
* Web Animations `@angular/platform-browser/animations`
5130
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
5231
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
53-
**/
32+
*/
5433
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5534

5635
/**
5736
* By default, zone.js will patch all possible macroTask and DomEvents
5837
* user can disable parts of macroTask/DomEvents patch by setting following flags
38+
* because those flags need to be set before `zone.js` being loaded, and webpack
39+
* will put import in the top of bundle, so user need to create a separate file
40+
* in this directory (for example: zone-flags.ts), and put the following flags
41+
* into that file, and then add the following code before importing zone.js.
42+
* import './zone-flags';
43+
*
44+
* The flags allowed in zone-flags.ts are listed here.
45+
*
46+
* The following flags will work for all browsers.
47+
*
48+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
49+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
50+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
51+
*
52+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
53+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
54+
*
55+
* (window as any).__Zone_enable_cross_context_check = true;
56+
*
5957
*/
6058

61-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
62-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
63-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
64-
65-
/*
66-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
67-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
68-
*/
69-
// (window as any).__Zone_enable_cross_context_check = true;
70-
7159
/***************************************************************************************************
7260
* Zone JS is required by default for Angular itself.
7361
*/
7462
import 'zone.js/dist/zone'; // Included with Angular CLI.
7563

7664

77-
7865
/***************************************************************************************************
7966
* APPLICATION IMPORTS
8067
*/

tsconfig.app.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
2+
{
3+
"extends": "./tsconfig.base.json",
4+
"compilerOptions": {
5+
"outDir": "./out-tsc/app",
6+
"types": []
7+
},
8+
"files": [
9+
"src/main.ts",
10+
"src/polyfills.ts"
11+
],
12+
"include": [
13+
"src/**/*.d.ts"
14+
]
15+
}

tsconfig.base.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"downlevelIteration": true,
9+
"experimentalDecorators": true,
10+
"moduleResolution": "node",
11+
"esModuleInterop": true,
12+
"importHelpers": true,
13+
"target": "es2015",
14+
"module": "es2020",
15+
"lib": [
16+
"es2018",
17+
"dom"
18+
],
19+
"paths": {
20+
"slider": [
21+
"dist/slider"
22+
]
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)