Skip to content

Commit

Permalink
improve docs and readme for unpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
WickyNilliams committed Apr 2, 2024
1 parent 40820fc commit 5304e26
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,25 @@ npm install cally

## Usage

### Via module

```js
import "cally";
```

## Usage with CDN
### Via CDN

```html
<script type="module" src="https://unpkg.com/cally"></script>
```

### Using the components

```html
<script src="https://unpkg.com/cally"></script>
<calendar-range months="2">
<calendar-month></calendar-month>
<calendar-month offset="1"></calendar-month>
</calendar-range>
```

## Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const tagline = "Small, feature-rich calendar components";

<Code
lang="html"
code={`<script\n type="module"\n src="https://unpkg.com/cally"\n></script>`}
code={`<script type="module" src="https://unpkg.com/cally"></script>`}
/>

<p>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"module": "dist/cally.js",
"types": "dist/cally.d.ts",
"unpkg": "dist/cally.js",
"exports": {
".": {
"types": "./dist/cally.d.ts",
Expand Down

0 comments on commit 5304e26

Please sign in to comment.