Skip to content

Commit 53c50f1

Browse files
committed
Update README: recommend better polyfills.
1 parent 843e431 commit 53c50f1

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.MD

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
npm install aspnet-validation es6-promise
1010
```
1111

12-
> aspnet-validation uses [Promise API](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), which is not supported in Internet Explorer. It is recommended to use [promise-polyfill](https://github.com/taylorhakes/promise-polyfill) or [es6-promise](https://github.com/stefanpenner/es6-promise) to resolve this issue...
12+
> aspnet-validation uses [Promise API](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), which is not supported in Internet Explorer. It is recommended to use [promise-polyfill](https://github.com/taylorhakes/promise-polyfill) or [ts-polyfill](https://github.com/ryanelian/ts-polyfill) or [core-js](https://github.com/zloirock/core-js) to resolve this issue...
1313
1414
Alternatively, download these:
1515

@@ -23,7 +23,7 @@ Alternatively, download these:
2323
### Via \<script src="..."\>
2424

2525
```html
26-
<script src="es6-promise.auto.min.js"></script>
26+
<script src="promise-polyfill.min.js"></script>
2727
<script src="aspnet-validation.min.js"></script>
2828
```
2929

@@ -36,7 +36,7 @@ v.bootstrap();
3636
### Via CommonJS / Browserify
3737

3838
```js
39-
require('es6-promise').polyfill();
39+
require('core-js');
4040
const aspnetValidation = require('aspnet-validation');
4141

4242
let v = new aspnetValidation.ValidationService();
@@ -46,23 +46,21 @@ v.bootstrap();
4646
### Via TypeScript / ES Modules
4747

4848
```ts
49-
import * as ES6Promise from 'es6-promise';
49+
import 'ts-polyfill';
5050
import { ValidationService } from 'aspnet-validation';
5151

52-
ES6Promise.polyfill();
5352
let v = new ValidationService();
5453
v.bootstrap();
5554
```
5655

57-
> Shameless self-promotion: use [instapack](https://github.com/ryanelian/instapack) for easy, rapid, and painless web application client development using TypeScript!
56+
> Shameless self-promotion: use [instapack](https://github.com/ryanelian/instapack) for easy, rapid, and painless web application front-end development using TypeScript!
5857
5958
## Why?
6059

61-
**jquery-3.3.1.min.js** + **jquery.validate.min.js** + **jquery.validate.unobtrusive.min.js** = 113 KB
60+
**jquery-3.3.2.min.js** + **jquery.validate.min.js** + **jquery.validate.unobtrusive.min.js** = 112 KB
6261

63-
**aspnet-validation.min.js:** 10.2 KB **(9.03%, ~3 KB GZIP)**
64-
- **promise-polyfill**: +2.81 KB (< 1 KB GZIP)
65-
- **es6-promise.auto.min.js** +6.19 KB (2.4 KB GZIP)
62+
**aspnet-validation.min.js:** 10.6 KB **(9.46%, ~4 KB GZIP)**
63+
- **promise-polyfill**: +3.06 KB (< 1 KB GZIP)
6664

6765
## Building the Source Code
6866

0 commit comments

Comments
 (0)