Skip to content

Commit 4cc5b48

Browse files
committed
docs: update installation info
1 parent 425cd31 commit 4cc5b48

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,55 @@ Organizes processes into distinct default phases (`read`, `update`, `render`), c
6969

7070
These methods are super useful in situations where you need to manage the frame dynamically, such as when the user switches tabs and returns to the page.
7171

72+
## Installation
73+
74+
Install `@hypernym/frame` package:
75+
76+
```sh
77+
# via pnpm
78+
pnpm add @hypernym/frame
79+
```
80+
81+
```sh
82+
# via npm
83+
npm install @hypernym/frame
84+
```
85+
86+
### CDN
87+
88+
Here are some examples of how to integrate **Frame** from a CDN via a script tag.
89+
90+
Also, it is possible to download files manually and serve them accordingly.
91+
92+
#### ESM (minified)
93+
94+
```html
95+
<script type="module">
96+
import { createFrame } from 'https://unpkg.com/@hypernym/frame/dist/index.min.mjs'
97+
const frame = createFrame()
98+
</script>
99+
```
100+
101+
#### IIEF (minified)
102+
103+
```html
104+
<script src="https://unpkg.com/@hypernym/frame/dist/index.iief.js"></script>
105+
<script>
106+
const { createFrame } = Frame
107+
const frame = createFrame()
108+
</script>
109+
```
110+
111+
#### UMD (minified)
112+
113+
```html
114+
<script src="https://unpkg.com/@hypernym/frame/dist/index.umd.js"></script>
115+
<script>
116+
const { createFrame } = Frame
117+
const frame = createFrame()
118+
</script>
119+
```
120+
72121
## Quick Start
73122

74123
Create a `frame` manager with default phases.

0 commit comments

Comments
 (0)