Update README.template.md

This commit is contained in:
Garrone Joseph 2020-05-15 23:57:49 +02:00 committed by GitHub
parent 271e34ff4c
commit c9198eccb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,16 +42,15 @@ Expose a global ( wider browser support):
```html ```html
<script src="//unpkg.com/#{REPO_NAME}#/umd_bundle.min.js"></script> <script src="//unpkg.com/#{REPO_NAME}#/umd_bundle.min.js"></script>
<script> <script>
var { myFunction, myObject } = window['#{REPO_NAME}#']; var myFunction = #{REPO_NAME_NO_DASHES}.myFunction;
</script> </script>
``` ```
Or import as an ES module: Or import as an ES module:
```html ```html
<script type="module" src="//unpkg.com/#{REPO_NAME}#/zz_esm/index.js"></script> <script type="module">
<script> import { myFunction, myObject } from '//unpkg.com/#{REPO_NAME}#/zz_esm/index.js';
import { myFunction, myObject } from '#{REPO_NAME}#';
</script> </script>
``` ```