ts-ci/README.template.md

57 lines
1.3 KiB
Markdown
Raw Normal View History

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-16 07:14:43 +02:00
<img src="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#/workflows/ci/badge.svg">
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>
2020-05-16 06:49:52 +02:00
var myFunction = #{REPO_NAME_NO_DASHES}#.myFunction;
2020-05-15 23:06:13 +02:00
</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
2020-05-15 23:57:49 +02:00
<script type="module">
import { myFunction, myObject } from '//unpkg.com/#{REPO_NAME}#/zz_esm/index.js';
2020-05-15 23:06:13 +02:00
</script>
```
2020-05-15 22:51:31 +02:00