2020-05-15 22:51:31 +02:00
|
|
|
<p align="center">
|
|
|
|
|
<img src="https://user-images.githubusercontent.com/6702424/80216211-00ef5280-863e-11ea-81de-59f3a3d4b8e4.png">
|
|
|
|
|
</p>
|
|
|
|
|
<p align="center">
|
|
|
|
|
<i>#{DESC}#</i>
|
|
|
|
|
<br>
|
|
|
|
|
<br>
|
2020-05-15 23:06:13 +02:00
|
|
|
<img src="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#/workflows/ci/badge.svg?branch=dev">
|
2020-05-15 22:51:31 +02:00
|
|
|
<img src="https://img.shields.io/bundlephobia/minzip/#{REPO_NAME}#">
|
|
|
|
|
<img src="https://img.shields.io/npm/dw/#{REPO_NAME}#">
|
|
|
|
|
</p>
|
|
|
|
|
<p align="center">
|
|
|
|
|
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#">Home</a>
|
|
|
|
|
-
|
|
|
|
|
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#">Documentation</a>
|
|
|
|
|
-
|
|
|
|
|
<a href="https://gitter.im/#{REPO_NAME}#/">Chat</a>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Install / Import
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
> npm install --save #{REPO_NAME}#
|
|
|
|
|
```
|
|
|
|
|
```typescript
|
|
|
|
|
import { myFunction, myObject } from '#{REPO_NAME}#';
|
2020-05-15 23:06:13 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Specific import
|
|
|
|
|
|
|
|
|
|
```typescript
|
2020-05-15 22:51:31 +02:00
|
|
|
import { myFunction } from '#{REPO_NAME}#/myFunction'
|
|
|
|
|
import { myObject } from '#{REPO_NAME}#/myObject'
|
|
|
|
|
```
|
|
|
|
|
|
2020-05-15 23:06:13 +02:00
|
|
|
## From HTML with CDN
|
|
|
|
|
|
|
|
|
|
Expose a global ( wider browser support):
|
2020-05-15 22:51:31 +02:00
|
|
|
|
2020-05-15 23:06:13 +02:00
|
|
|
```html
|
|
|
|
|
<script src="//unpkg.com/#{REPO_NAME}#/umd_bundle.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
var { myFunction, myObject } = window['#{REPO_NAME}#'];
|
|
|
|
|
</script>
|
|
|
|
|
```
|
2020-05-15 22:51:31 +02:00
|
|
|
|
2020-05-15 23:06:13 +02:00
|
|
|
Or import as an ES module:
|
2020-05-15 22:51:31 +02:00
|
|
|
|
2020-05-15 23:06:13 +02:00
|
|
|
```html
|
|
|
|
|
<script type="module" src="//unpkg.com/#{REPO_NAME}#/zz_esm/index.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
import { myFunction, myObject } from '#{REPO_NAME}#';
|
|
|
|
|
</script>
|
|
|
|
|
```
|
2020-05-15 22:51:31 +02:00
|
|
|
|