Skip to content

Commit

Permalink
docs: add description to use with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukina-7mochi committed Jun 9, 2024
1 parent c7fe901 commit 0ca0a98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Check out this live demo to see GitHub Repo Cards in action:
https://tsukina-7mochi.github.io/github-cards/

## Usage

### via CDN

You can import script from CDN `esm.sh`. Add the following `<script>` tag to your HTML document to load library:

Expand All @@ -40,6 +42,16 @@ Use the `<gh-repo-card>` custom element wherever you want to display a GitHub re
See `docs` directory for demonstration page implementation.
### via npm
You can simply import this library instead of loading from CDN:
```typescript
require('@tsukina-7mochi/github-cards`);
// or
import '@tsukina-7mochi/github-cards`;
```
## API
### gh-repo-card
Expand Down

0 comments on commit 0ca0a98

Please sign in to comment.