Ver Fonte

Docs: polyfills are already included in the CDN bundle (#1576)

* polyfills are already included in the CDN bundle

* add screenshot with meta fields to Dashboard docs
Artur Paikin há 6 anos atrás
pai
commit
201dbfbf00

+ 1 - 3
README.md

@@ -158,11 +158,9 @@ require('whatwg-fetch')
 const Uppy = require('@uppy/core')
 ```
 
-If you're using Uppy via a script tag, you can load the polyfills from [JSDelivr](https://www.jsdelivr.com/) like so:
+If you're using Uppy from CDN, `es6-promise` and  `whatwg-fetch` are already included in the bundle, no need to include anything additionally:
 
 ```html
-<script src="https://cdn.jsdelivr.net/npm/es6-promise@4.2.5/dist/es6-promise.auto.min.js"></script>
-<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@3.0.0/dist/fetch.umd.min.js"></script>
 <script src="https://transloadit.edgly.net/releases/uppy/v1.0.0/uppy.min.js"></script>
 ```
 

+ 2 - 0
website/src/docs/dashboard.md

@@ -203,6 +203,8 @@ An array of UI field objects that will be shown when a user clicks the “edit
 })
 ```
 
+![](/images/uppy-dashboard-meta-fields.jpg)
+
 Note that this metadata will only be set on a file object if it is entered by the user. If the user doesn't edit a file's metadata, it will not have default values; instead everything will be `undefined`. If you want to set a certain meta field to each file regardless of user actions, set [`meta` in the Uppy constructor options](/docs/uppy/#meta).
 
 ### `closeModalOnClickOutside: false`

+ 1 - 3
website/src/docs/index.md

@@ -164,10 +164,8 @@ require('whatwg-fetch')
 const Uppy = require('@uppy/core')
 ```
 
-If you're using Uppy via a script tag, you can load the polyfills from [JSDelivr](https://www.jsdelivr.com/) like so:
+If you're using Uppy from CDN, `es6-promise` and  `whatwg-fetch` are already included in the bundle, no need to include anything additionally:
 
 ```html
-<script src="https://cdn.jsdelivr.net/npm/es6-promise@4.2.5/dist/es6-promise.auto.min.js"></script>
-<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@3.0.0/dist/fetch.umd.min.js"></script>
 <script src="https://transloadit.edgly.net/releases/uppy/v1.0.0/uppy.min.js"></script>
 ```

BIN
website/src/images/uppy-dashboard-meta-fields.jpg