Skip to content

Commit 55e2795

Browse files
committed
refactor: update config files
1 parent 8e09684 commit 55e2795

File tree

10 files changed

+92
-41
lines changed

10 files changed

+92
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../../dist/netbasal/ngx-content-loader",
4-
"deleteDestPath": false,
54
"lib": {
65
"entryFile": "src/public_api.ts"
76
}
8-
}
7+
}

projects/netbasal/ngx-content-loader/tsconfig.lib.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"types": [],
1515
"lib": [
1616
"dom",
17-
"es2015"
17+
"es2018"
1818
]
1919
},
2020
"angularCompilerOptions": {
@@ -23,8 +23,7 @@
2323
"strictMetadataEmit": true,
2424
"fullTemplateTypeCheck": true,
2525
"strictInjectionParameters": true,
26-
"flatModuleId": "AUTOGENERATED",
27-
"flatModuleOutFile": "AUTOGENERATED"
26+
"enableResourceInlining": true
2827
},
2928
"exclude": [
3029
"src/test.ts",

src/browserslist

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
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
4+
#
5+
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6+
57
> 0.5%
68
last 2 versions
79
Firefox ESR
810
not dead
9-
# IE 9-11
11+
IE 9-11

src/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function (config) {
1717
},
1818
coverageIstanbulReporter: {
1919
dir: require('path').join(__dirname, '../coverage'),
20-
reports: ['html', 'lcovonly'],
20+
reports: ['html', 'lcovonly', 'text-summary'],
2121
fixWebpackSourcePaths: true
2222
},
2323
reporters: ['progress', 'kjhtml'],
@@ -28,4 +28,4 @@ module.exports = function (config) {
2828
browsers: ['Chrome'],
2929
singleRun: false
3030
});
31-
};
31+
};

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if (environment.production) {
99
}
1010

1111
platformBrowserDynamic().bootstrapModule(AppModule)
12-
.catch(err => console.log(err));
12+
.catch(err => console.error(err));

src/polyfills.ts

+62-12
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,85 @@
1+
/**
2+
* This file includes polyfills needed by Angular and is loaded before the app.
3+
* You can add your own extra polyfills to this file.
4+
*
5+
* This file is divided into 2 sections:
6+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8+
* file.
9+
*
10+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13+
*
14+
* Learn more in https://angular.io/guide/browser-support
15+
*/
16+
17+
/***************************************************************************************************
18+
* BROWSER POLYFILLS
19+
*/
20+
21+
/** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills.
22+
* This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot
23+
*/
124

25+
// import 'core-js/es6/symbol';
26+
// import 'core-js/es6/object';
27+
// import 'core-js/es6/function';
28+
// import 'core-js/es6/parse-int';
29+
// import 'core-js/es6/parse-float';
30+
// import 'core-js/es6/number';
31+
// import 'core-js/es6/math';
32+
// import 'core-js/es6/string';
33+
// import 'core-js/es6/date';
34+
// import 'core-js/es6/array';
35+
// import 'core-js/es6/regexp';
36+
// import 'core-js/es6/map';
37+
// import 'core-js/es6/weak-map';
38+
// import 'core-js/es6/set';
239

40+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
41+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
42+
43+
/** IE10 and IE11 requires the following for the Reflect API. */
44+
// import 'core-js/es6/reflect';
345

446
/**
547
* Web Animations `@angular/platform-browser/animations`
648
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
749
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
8-
**/
50+
*/
951
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
1052

1153
/**
1254
* By default, zone.js will patch all possible macroTask and DomEvents
1355
* user can disable parts of macroTask/DomEvents patch by setting following flags
56+
* because those flags need to be set before `zone.js` being loaded, and webpack
57+
* will put import in the top of bundle, so user need to create a separate file
58+
* in this directory (for example: zone-flags.ts), and put the following flags
59+
* into that file, and then add the following code before importing zone.js.
60+
* import './zone-flags.ts';
61+
*
62+
* The flags allowed in zone-flags.ts are listed here.
63+
*
64+
* The following flags will work for all browsers.
65+
*
66+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
67+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
68+
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
69+
*
70+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
71+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
72+
*
73+
* (window as any).__Zone_enable_cross_context_check = true;
74+
*
1475
*/
1576

16-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
17-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
18-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
19-
20-
/*
21-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
22-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
23-
*/
24-
// (window as any).__Zone_enable_cross_context_check = true;
25-
2677
/***************************************************************************************************
2778
* Zone JS is required by default for Angular itself.
2879
*/
2980
import 'zone.js/dist/zone'; // Included with Angular CLI.
3081

3182

32-
3383
/***************************************************************************************************
3484
* APPLICATION IMPORTS
3585
*/

src/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"types": []
66
},
77
"exclude": [
8-
"src/test.ts",
8+
"test.ts",
99
"**/*.spec.ts"
1010
]
1111
}

src/tslint.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"extends": "../tslint.json",
3-
"rules": {
4-
"directive-selector": [
5-
true,
6-
"attribute",
7-
"app",
8-
"camelCase"
9-
],
10-
"component-selector": [
11-
true,
12-
"element",
13-
"app",
14-
"kebab-case"
15-
]
16-
}
2+
"extends": "../tslint.json",
3+
"rules": {
4+
"directive-selector": [
5+
true,
6+
"attribute",
7+
"app",
8+
"camelCase"
9+
],
10+
"component-selector": [
11+
true,
12+
"element",
13+
"app",
14+
"kebab-case"
15+
]
16+
}
1717
}

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"baseUrl": "./",
5-
"importHelpers": true,
65
"outDir": "./dist/out-tsc",
76
"sourceMap": true,
87
"declaration": false,
98
"module": "es2015",
109
"moduleResolution": "node",
1110
"emitDecoratorMetadata": true,
1211
"experimentalDecorators": true,
12+
"importHelpers": true,
1313
"target": "es5",
1414
"typeRoots": [
1515
"node_modules/@types"
1616
],
1717
"lib": [
18-
"es2017",
18+
"es2018",
1919
"dom"
2020
],
2121
"paths": {

tslint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"rulesDirectory": [
3-
"node_modules/codelyzer"
3+
"codelyzer"
44
],
55
"rules": {
66
"arrow-return-shorthand": true,
@@ -65,6 +65,7 @@
6565
],
6666
"no-misused-new": true,
6767
"no-non-null-assertion": true,
68+
"no-redundant-jsdoc": true,
6869
"no-shadowed-variable": true,
6970
"no-string-literal": false,
7071
"no-string-throw": true,

0 commit comments

Comments
 (0)