Skip to content

Commit a986e66

Browse files
authored
fix(dependencies): Fixed wrong type dependencies in definition files (#2)
- Removed Web Animations API polyfill from peerDependencies - Remove core-js typings, using native TS libs instead (es2015 & dom) - Updated docs to reflect the use of polyfills better Closes #1
1 parent 26480f6 commit a986e66

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ minified one (in `bundles/angular-notifier.umd.min.js`).
7575
Depending on the browser support we're aiming for, we might also need to bring in some of the following polyfills:
7676

7777
* To be able to use newer JavaScript features in older browsers (e.g. Promises), we can use **[core-js](https://github.com/zloirock/core-js)**.
78+
To use it, we simply have to include the `node_modules/core-js/client/shim.min.js` at the top of our main HTML page.
7879
* For animation support (in particular, for **[Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API)** support), we can use **[web-animations-js](https://github.com/web-animations/web-animations-js)**.
80+
To use it, we simply have to include the `node_modules/web-animations-js/web-animations-next.min.js` at the top of our main HTML page.
7981

80-
> Both of these polyfills are also official recommendations by the Angular team.
82+
> Both of these polyfills are also official recommendations by the Angular team. Both are part of this project#s devDependencies (see
83+
>`package.json` file).
8184
8285
<br><br>
8386

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
"peerDependencies": {
4141
"@angular/core": "2.x",
4242
"@angular/common": "2.x",
43-
"rxjs": "5.0.0-beta.12",
44-
"web-animations-js": "2.2.x"
43+
"rxjs": "5.0.0-beta.12"
4544
},
4645
"devDependencies": {
4746
"@angular/core": "2.x",
@@ -50,7 +49,6 @@
5049
"@angular/compiler-cli": "2.x",
5150
"@angular/platform-browser": "2.x",
5251
"@angular/platform-browser-dynamic": "2.x",
53-
"@types/core-js": "0.9.x",
5452
"@types/jasmine": "2.5.x",
5553
"browser-sync": "2.18.x",
5654
"codelyzer": "2.0.0-beta.1",

tools/gulp/ts/ts-build.task.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ gulp.task( 'ts:build--publish', ( done ) => {
129129
message: `Angular compiler error.\n${ err }`,
130130
showStack: true
131131
} );
132+
gutil.log( `[NGC] Angular compiler error.\n${ err }` );
132133
} else {
133134

134135
// Now, copy the results back into the source folder

tsconfig-aot.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
"compilerOptions": {
33
"declaration": true,
44
"emitDecoratorMetadata": true,
5-
"newLine": "CRLF",
65
"experimentalDecorators": true,
6+
"lib": [
7+
"dom",
8+
"es2015"
9+
],
710
"module": "es2015",
811
"moduleResolution": "node",
12+
"newLine": "CRLF",
913
"noImplicitAny": true,
1014
"noImplicitThis": true,
1115
"removeComments": false,

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
"compilerOptions": {
33
"declaration": true,
44
"emitDecoratorMetadata": true,
5-
"newLine": "CRLF",
65
"experimentalDecorators": true,
6+
"lib": [
7+
"dom",
8+
"es2015"
9+
],
710
"module": "commonjs",
811
"moduleResolution": "node",
12+
"newLine": "CRLF",
913
"noImplicitAny": true,
1014
"noImplicitThis": true,
1115
"removeComments": false,

0 commit comments

Comments
 (0)